[kvm-unit-tests,4/8] nVMX: Drop redundant check for guest termination
diff mbox series

Message ID 20200312232745.884-5-sean.j.christopherson@intel.com
State New
Headers show
  • nVMX: Clean up __enter_guest() and co.
Related show

Commit Message

Sean Christopherson March 12, 2020, 11:27 p.m. UTC
Remove the check_for_guest_termination() call in
enter_guest_with_bad_controls() as __enter_guest() unconditionally
performs the check if VM-Enter is successful (and aborts on failed
VM-Entry for the ...bad_controls() variant).

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
 x86/vmx.c | 10 ----------
 1 file changed, 10 deletions(-)

diff mbox series

diff --git a/x86/vmx.c b/x86/vmx.c
index da17807..d92350d 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1895,16 +1895,6 @@  void enter_guest_with_bad_controls(void)
 	       "VM-Inst Error # is %d (VM entry with invalid control field(s))",
-	/*
-	 * This if statement shouldn't fire, as the entire premise of this
-	 * function is that VM entry is expected to fail, rather than succeed
-	 * and execute to termination. However, if the VM entry does
-	 * unexpectedly succeed, it's nice to check whether the guest has
-	 * terminated, to reduce the number of error messages.
-	 */
-	if (!result.vm_fail)
-		check_for_guest_termination();
 void enter_guest(void)