From: Marc Orr <marcorr@google.com>
To: kvm@vger.kernel.org, jmattson@google.com, pshier@google.com,
sean.j.christopherson@intel.com, krish.sadhukhan@oracle.com,
pbonzini@redhat.com, rkrcmar@redhat.com
Cc: Marc Orr <marcorr@google.com>
Subject: [kvm-unit-tests PATCH v6 1/2] x86: nvmx: fix bug in __enter_guest()
Date: Fri, 20 Sep 2019 15:29:44 -0700 [thread overview]
Message-ID: <20190920222945.235480-1-marcorr@google.com> (raw)
__enter_guest() should only set the launched flag when a launch has
succeeded. Thus, don't set the launched flag when the VMX_ENTRY_FAILURE,
bit 31, is set in the VMCS exit reason.
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Marc Orr <marcorr@google.com>
---
v5 -> v6
* No changes.
x86/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86/vmx.c b/x86/vmx.c
index 6079420db33a..7313c78f15c2 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1820,7 +1820,7 @@ static void __enter_guest(u8 abort_flag, struct vmentry_failure *failure)
abort();
}
- if (!failure->early) {
+ if (!failure->early && !(vmcs_read(EXI_REASON) & VMX_ENTRY_FAILURE)) {
launched = 1;
check_for_guest_termination();
}
--
2.23.0.351.gc4317032e6-goog
next reply other threads:[~2019-09-20 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 22:29 Marc Orr [this message]
2019-09-20 22:29 ` [kvm-unit-tests PATCH v6 2/2] x86: nvmx: test max atomic switch MSRs Marc Orr
2019-09-23 20:08 ` Sean Christopherson
2019-09-25 1:18 ` Marc Orr
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=20190920222945.235480-1-marcorr@google.com \
--to=marcorr@google.com \
--cc=jmattson@google.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pshier@google.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.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.