kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v6 1/2] x86: nvmx: fix bug in __enter_guest()
@ 2019-09-20 22:29 Marc Orr
  2019-09-20 22:29 ` [kvm-unit-tests PATCH v6 2/2] x86: nvmx: test max atomic switch MSRs Marc Orr
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Orr @ 2019-09-20 22:29 UTC (permalink / raw)
  To: kvm, jmattson, pshier, sean.j.christopherson, krish.sadhukhan,
	pbonzini, rkrcmar
  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>
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


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

end of thread, other threads:[~2019-09-25  1:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-20 22:29 [kvm-unit-tests PATCH v6 1/2] x86: nvmx: fix bug in __enter_guest() Marc Orr
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).