X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=73f154ad701fc9eb17d086028554222b6a5a4c9c;hb=aad69eda8e2354cf146054e57ad25fe201a1cb52;hp=1545cad7d60a6d545f622ab8899932f16a143a27;hpb=cbf35ad72de3a7a1f6eee3e8b2b35d7f31df22a5;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 1545cad..73f154a 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -32,8 +32,11 @@ int handle_svm_exit(struct guest_info * info) { 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; @@ -230,17 +233,22 @@ int handle_svm_exit(struct guest_info * info) { 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; @@ -314,16 +322,19 @@ int handle_svm_exit(struct guest_info * info) { 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;