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
Cc: Marc Orr <marcorr@google.com>
Subject: [kvm-unit-tests PATCH v3 1/2] x86: nvmx: fix bug in __enter_guest()
Date: Tue, 17 Sep 2019 11:57:52 -0700 [thread overview]
Message-ID: <20190917185753.256039-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.
Signed-off-by: Marc Orr <marcorr@google.com>
---
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.237.gc6a4ce50a0-goog
next reply other threads:[~2019-09-17 18:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 18:57 Marc Orr [this message]
2019-09-17 18:57 ` [kvm-unit-tests PATCH v3 2/2] x86: nvmx: test max atomic switch MSRs Marc Orr
2019-09-17 19:47 ` Sean Christopherson
2019-09-17 20:16 ` Marc Orr
2019-09-17 22:28 ` Sean Christopherson
2019-09-17 22:35 ` Marc Orr
2019-09-17 21:37 ` Krish Sadhukhan
2019-09-18 22:24 ` Marc Orr
2019-09-17 19:14 ` [kvm-unit-tests PATCH v3 1/2] x86: nvmx: fix bug in __enter_guest() Krish Sadhukhan
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=20190917185753.256039-1-marcorr@google.com \
--to=marcorr@google.com \
--cc=jmattson@google.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pshier@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox