X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fsvm_handler.c;h=6624da63cf6a6655e5ab2c28144e797588ae1d3b;hb=959ed075fac59969a8dc299e51824166f50bb2d0;hp=e5ec493b72ea5dce1410141af2c35a5f8f0cc8f3;hpb=8cb3daaded0d8c80be801aa74493006b5a06999f;p=palacios.git diff --git a/palacios/src/geekos/svm_handler.c b/palacios/src/geekos/svm_handler.c index e5ec493..6624da6 100644 --- a/palacios/src/geekos/svm_handler.c +++ b/palacios/src/geekos/svm_handler.c @@ -2,6 +2,8 @@ #include #include +extern struct vmm_os_hooks * os_hooks; + int handle_svm_exit(struct guest_info * info) { vmcb_ctrl_t * guest_ctrl = 0; @@ -14,17 +16,19 @@ int handle_svm_exit(struct guest_info * info) { // Update the high level state info->rip = guest_state->rip; - info->rsp = guest_state->rsp; + info->vm_regs.rsp = guest_state->rsp; + info->vm_regs.rax = guest_state->rax; + info->vm_regs.rsp = guest_state->rsp; - PrintDebug("SVM Returned: (Exit Code=%x) (VMCB=%x)\n",&(guest_ctrl->exit_code), info->vmm_data); + PrintDebug("SVM Returned: (Exit Code=%x) (VMCB=%x)\n", &(guest_ctrl->exit_code), info->vmm_data); PrintDebug("RIP: %x\n", guest_state->rip); exit_code = guest_ctrl->exit_code; - // PrintDebugVMCB((vmcb_t*)(info->vmm_data)); + // PrintDebugVMCB((vmcb_t*)(info->vmm_data)); PrintDebug("SVM Returned: Exit Code: %x\n",exit_code); PrintDebug("io_info1 low = 0x%.8x\n", *(uint_t*)&(guest_ctrl->exit_info1)); PrintDebug("io_info1 high = 0x%.8x\n", *(uint_t *)(((uchar_t *)&(guest_ctrl->exit_info1)) + 4)); @@ -53,8 +57,9 @@ int handle_svm_exit(struct guest_info * info) { // Update the low level state + guest_state->rax = info->vm_regs.rax; guest_state->rip = info->rip; - guest_state->rsp = info->rsp; + guest_state->rsp = info->vm_regs.rsp; return 0; }