All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, rkrcmar@redhat.com, jmattson@google.com
Subject: [PATCH 2/4] kvm-unit-test: nVMX: __enter_guest() needs to also check for VMX_FAIL_STATE
Date: Mon, 14 Oct 2019 20:16:31 -0400	[thread overview]
Message-ID: <20191015001633.8603-3-krish.sadhukhan@oracle.com> (raw)
In-Reply-To: <20191015001633.8603-1-krish.sadhukhan@oracle.com>

  ..as both VMX_ENTRY_FAILURE and VMX_FAIL_STATE together comprise the
    exit eeason when VM-entry fails due invalid guest state.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
---
 x86/vmx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index 647ab49..4ce0fb5 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1848,7 +1848,8 @@ static void __enter_guest(u8 abort_flag, struct vmentry_failure *failure)
 	vmx_enter_guest(failure);
 	if ((abort_flag & ABORT_ON_EARLY_VMENTRY_FAIL && failure->early) ||
 	    (abort_flag & ABORT_ON_INVALID_GUEST_STATE &&
-	    vmcs_read(EXI_REASON) & VMX_ENTRY_FAILURE)) {
+	    (vmcs_read(EXI_REASON) & (VMX_ENTRY_FAILURE | VMX_FAIL_STATE))
+	    == (VMX_ENTRY_FAILURE | VMX_FAIL_STATE))) {
 
 		print_vmentry_failure_info(failure);
 		abort();
-- 
2.20.1


  parent reply	other threads:[~2019-10-15  0:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  0:16 [PATCH 0/4]: kvm-unit-test: nVMX: Test deferring of error from VM-entry MSR-load area Krish Sadhukhan
2019-10-15  0:16 ` [PATCH 1/4] kvm-unit-test: VMX: Replace hard-coded exit instruction length Krish Sadhukhan
2019-10-16 16:39   ` Jim Mattson
2019-10-15  0:16 ` Krish Sadhukhan [this message]
2019-10-16 17:55   ` [PATCH 2/4] kvm-unit-test: nVMX: __enter_guest() needs to also check for VMX_FAIL_STATE Jim Mattson
2019-10-17 18:24     ` Sean Christopherson
2019-10-15  0:16 ` [PATCH 3/4] kvm-unit-test: nVMX: Test deferring of error from VM-entry MSR-load area Krish Sadhukhan
2019-10-15  0:16 ` [PATCH 4/4] kvm-unit-test: nVMX: Use #defines for exit reason in advance_guest_state_test() Krish Sadhukhan
2019-10-16 17:51   ` Jim Mattson

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=20191015001633.8603-3-krish.sadhukhan@oracle.com \
    --to=krish.sadhukhan@oracle.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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.