info->ctrl_regs.cr4 = guest_state->cr4;
info->ctrl_regs.cr8 = guest_ctrl->guest_ctrl.V_TPR;
info->ctrl_regs.rflags = guest_state->rflags;
+ info->ctrl_regs.efer = guest_state->efer;
get_vmcb_segments((vmcb_t*)(info->vmm_data), &(info->segments));
+ info->cpu_mode = get_cpu_mode(info);
+ info->mem_mode = get_mem_mode(info);
exit_code = guest_ctrl->exit_code;
PrintError("Host Address of rip = 0x%x\n", host_addr);
- memset(buf, 0, 15);
+ memset(buf, 0, 32);
- PrintError("Reading from 0x%x in guest\n", rip_addr);
+ PrintError("Reading instruction stream in guest\n", rip_addr);
if (info->mem_mode == PHYSICAL_MEM) {
- read_guest_pa_memory(info, rip_addr, 15, buf);
+ read_guest_pa_memory(info, rip_addr-16, 32, buf);
} else {
- read_guest_va_memory(info, rip_addr, 15, buf);
+ read_guest_va_memory(info, rip_addr-16, 32, buf);
}
- PrintTraceMemDump(buf, 15);
+ PrintDebug("16 bytes before Rip\n");
+ PrintTraceMemDump(buf, 16);
+ PrintDebug("Rip onward\n");
+ PrintTraceMemDump(buf+16, 16);
+
+
return -1;
return -1;
}
+ } else {
+#ifdef DEBUG_INTERRUPTS
+ PrintDebug("No interrupts/exceptions pending\n");
+#endif
}
-
guest_state->cr0 = info->ctrl_regs.cr0;
guest_state->cr2 = info->ctrl_regs.cr2;
guest_state->cr3 = info->ctrl_regs.cr3;
guest_state->cr4 = info->ctrl_regs.cr4;
guest_ctrl->guest_ctrl.V_TPR = info->ctrl_regs.cr8 & 0xff;
guest_state->rflags = info->ctrl_regs.rflags;
-
+ guest_state->efer = info->ctrl_regs.efer;
guest_state->cpl = info->cpl;