Skip to contentSkip to conversation

clear leftmost bit when exit failure is vm entry type

PATCH New Manish Regmi 1 participant 1 message Apr 20, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 clear leftmost bit when exit failure is vm entry type

hi,
When the vm exit reason is VM Entry failures it has leftmost bit set.
This patch
- clears the leftmost bit when copying to vmx->exit_reason. This will make the checks like if ((vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY) valid in vmx_complete_interrupts.

--------

arch/x86/kvm/vmx.c +1 -1
index 0b896ac..e0ca917 100644
@@ -3642,7 +3642,7 @@ static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
 
 	exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
 
-	vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
+	vmx->exit_reason = vmcs_read32(VM_EXIT_REASON) & ~VMX_EXIT_REASONS_FAILED_VMENTRY;
 
 	/* Handle machine checks before interrupts are enabled */
 	if ((vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY)

regards
Manish Regmi