All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1 V2] clear leftmost bit when exit failure is vm entry type
@ 2010-04-20  2:19 Manish Regmi
  0 siblings, 0 replies; only message in thread
From: Manish Regmi @ 2010-04-20  2:19 UTC (permalink / raw)
  To: kvm; +Cc: avi

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.

Signed-off-by: Manish Regmi <regmi.manish@gmail.com>
--------

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0b896ac..e0ca917 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-20  2:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  2:19 [PATCH 1/1 V2] clear leftmost bit when exit failure is vm entry type Manish Regmi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.