All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manish Regmi <regmi.manish@gmail.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com
Subject: [PATCH 1/1 V2] clear leftmost bit when exit failure is vm entry type
Date: Mon, 19 Apr 2010 21:19:02 -0500	[thread overview]
Message-ID: <4BCD0F16.2080701@gmail.com> (raw)

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

                 reply	other threads:[~2010-04-20  2:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BCD0F16.2080701@gmail.com \
    --to=regmi.manish@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.