X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=4ab4979a4e72f5b2942afd7d5ca7485ba66ade8a;hb=639fdba00d36b2a60fad3d28703459354cf8744f;hp=7ac7be2957edb2de00927d518d60fb07a31f3021;hpb=d16ef42bba84c7fe88352e5dc23e5e70a5207e29;p=palacios.releases.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 7ac7be2..4ab4979 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -7,7 +7,6 @@ #include - int handle_svm_exit(struct guest_info * info) { vmcb_ctrl_t * guest_ctrl = 0; vmcb_saved_state_t * guest_state = 0; @@ -22,6 +21,7 @@ int handle_svm_exit(struct guest_info * info) { info->vm_regs.rsp = guest_state->rsp; info->vm_regs.rax = guest_state->rax; + info->cpl = guest_state->cpl; info->ctrl_regs.cr0 = guest_state->cr0; @@ -36,7 +36,7 @@ int handle_svm_exit(struct guest_info * info) { exit_code = guest_ctrl->exit_code; - PrintDebug("SVM Returned: Exit Code: %x\n",exit_code); + //PrintDebug("SVM Returned: Exit Code: %x\n",exit_code); // PrintDebugVMCB((vmcb_t*)(info->vmm_data)); @@ -110,8 +110,15 @@ int handle_svm_exit(struct guest_info * info) { return -1; } + } else if (exit_code == VMEXIT_INVLPG) { + if (info->page_mode == SHADOW_PAGING) { + PrintDebug("Invlpg\n"); + if (handle_shadow_invlpg(info) == -1) { + return -1; + } + } + /* - (exit_code == VMEXIT_INVLPG) || (exit_code == VMEXIT_INVLPGA) || */ @@ -226,6 +233,8 @@ int handle_svm_exit(struct guest_info * info) { guest_state->rflags = info->ctrl_regs.rflags; + guest_state->cpl = info->cpl; + guest_state->rax = info->vm_regs.rax; guest_state->rip = info->rip; guest_state->rsp = info->vm_regs.rsp;