power_unit_divisor = 1 << value;
/* time unit: 1/time_unit_divisor Seconds */
- value =(output & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
+ value = (output & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
time_unit_divisor = 1 << value;
return 0;
#define ENERGY_UNIT_MASK 0x1F00
#define TIME_UNIT_OFFSET 0x10
-#define TIME_UNIT_MASK 0xF000
+#define TIME_UNIT_MASK 0xF0000
#endif
rc=generic_read_port_passthrough(core,port,src,length,priv_data);
- PrintDebug(core->vm_info, core, " done ... read 0x");
-
- for (i = 0; i < rc; i++) {
- PrintDebug(core->vm_info, core, "%x", ((uint8_t *)src)[i]);
+ if (rc<0) {
+ PrintError(core->vm_info, core, "FAILED\n");
+ return rc;
+ } else {
+ PrintDebug(core->vm_info, core, " done ... read 0x");
+
+ for (i = 0; i < rc; i++) {
+ PrintDebug(core->vm_info, core, "%x", ((uint8_t *)src)[i]);
+ }
+
+ PrintDebug(core->vm_info, core, "\n");
}
-
- PrintDebug(core->vm_info, core, "\n");
-
+
return rc;
}
PrintDebug(VM_NONE, VCORE_NONE, "SVM_VM_CR_MSR = 0x%x 0x%x\n", vm_cr_high, vm_cr_low);
- if ((vm_cr_low & SVM_VM_CR_MSR_svmdis) == 1) {
+ if (vm_cr_low & SVM_VM_CR_MSR_svmdis) {
V3_Print(VM_NONE, VCORE_NONE, "SVM is available but is disabled.\n");
v3_cpuid(CPUID_SVM_REV_AND_FEATURE_IDS, &eax, &ebx, &ecx, &edx);
{
case PT_ENTRY_NOT_PRESENT:
return -1;
+ break;
case PT_ENTRY_PAGE:
{
pde32pae_t * guest_pde = NULL;
{
case PT_ENTRY_NOT_PRESENT:
return -1;
+ break;
case PT_ENTRY_LARGE_PAGE:
{
addr_t large_page_pa = (addr_t)guest_pte_pa;
}
return 0;
}
+ break;
case PT_ENTRY_PAGE:
{
pte32pae_t * guest_pte = NULL;
return 0;
}
}
+ break;
}
}
+ break;
default:
PrintError(info->vm_info, info, "Invalid page type for PD32PAE\n");
return -1;
} else {
v3_yield(core,-1);
}
+ break;
default:
PrintError(core->vm_info, core, "Unknown yield strategy (%d) using GREEDY\n",core->vm_info->perf_options.yield_strategy.strategy);
v3_yield(core,-1);