From: Lei Xia Date: Fri, 1 Apr 2011 14:26:01 +0000 (-0500) Subject: Minor Fix to VMX code X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b93b104b5c8eee70e11304789b2a7d66cff9704;p=palacios.git Minor Fix to VMX code Now Palacios+Kitten works again on VT machine --- diff --git a/palacios/src/palacios/vmcs.c b/palacios/src/palacios/vmcs.c index 9d9b40d..0b874fd 100644 --- a/palacios/src/palacios/vmcs.c +++ b/palacios/src/palacios/vmcs.c @@ -851,6 +851,7 @@ int v3_vmcs_get_field_len(vmcs_field_t field) { case VMCS_GUEST_DBG_CTL_HIGH: case VMCS_GUEST_PERF_GLOBAL_CTRL_HIGH: case VMCS_HOST_PERF_GLOBAL_CTRL_HIGH: + case VMCS_GUEST_EFER_HIGH: return 4; /* Natural Width Control Fields */ @@ -914,8 +915,7 @@ int v3_vmcs_get_field_len(vmcs_field_t field) { case VMCS_HOST_SYSENTER_EIP: case VMCS_HOST_RSP: case VMCS_HOST_RIP: - - case VMCS_GUEST_EFER: + case VMCS_GUEST_EFER: return sizeof(addr_t); default: diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index a773191..80f3350 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -770,7 +770,7 @@ int v3_vmx_enter(struct guest_info * info) { #endif // Handle any exits needed still in the atomic section - if (v3_handle_vmx_exit(info, &exit_info) == -1) { + if (v3_handle_atomic_vmx_exit(info, &exit_info) == -1) { PrintError("Error in atomic VMX exit handler\n"); return -1; } diff --git a/palacios/src/palacios/vmx_ctrl_regs.c b/palacios/src/palacios/vmx_ctrl_regs.c index afa0fb8..685de90 100644 --- a/palacios/src/palacios/vmx_ctrl_regs.c +++ b/palacios/src/palacios/vmx_ctrl_regs.c @@ -161,7 +161,7 @@ static int handle_mov_to_cr0(struct guest_info * info, v3_reg_t * new_cr0, struc return -1; } - if (vmx_info->state == VMXASSIST_ENABLED) { + if (vmx_info->assist_state == VMXASSIST_ENABLED) { PrintDebug("Loading VMXASSIST at RIP: %p\n", (void *)(addr_t)info->rip); } else { PrintDebug("Leaving VMXASSIST and entering protected mode at RIP: %p\n",