public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v4 1/2] x86: nvmx: fix bug in __enter_guest()
@ 2019-09-17 20:16 Marc Orr
  2019-09-17 20:16 ` [kvm-unit-tests PATCH v4 2/2] x86: nvmx: test max atomic switch MSRs Marc Orr
  2019-09-17 22:24 ` [kvm-unit-tests PATCH v4 1/2] x86: nvmx: fix bug in __enter_guest() Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Orr @ 2019-09-17 20:16 UTC (permalink / raw)
  To: kvm, jmattson, pshier, sean.j.christopherson, krish.sadhukhan; +Cc: Marc Orr

__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>
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-17 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-17 20:16 [kvm-unit-tests PATCH v4 1/2] x86: nvmx: fix bug in __enter_guest() Marc Orr
2019-09-17 20:16 ` [kvm-unit-tests PATCH v4 2/2] x86: nvmx: test max atomic switch MSRs Marc Orr
2019-09-17 22:24 ` [kvm-unit-tests PATCH v4 1/2] x86: nvmx: fix bug in __enter_guest() Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox