kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH 4/8] nVMX: Drop redundant check for guest termination
Date: Thu, 12 Mar 2020 16:27:41 -0700	[thread overview]
Message-ID: <20200312232745.884-5-sean.j.christopherson@intel.com> (raw)
In-Reply-To: <20200312232745.884-1-sean.j.christopherson@intel.com>

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 --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)
 	report(vmcs_read(VMX_INST_ERROR) == VMXERR_ENTRY_INVALID_CONTROL_FIELD,
 	       "VM-Inst Error # is %d (VM entry with invalid control field(s))",
 	       VMXERR_ENTRY_INVALID_CONTROL_FIELD);
-
-	/*
-	 * 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)
-- 
2.24.1


  parent reply	other threads:[~2020-03-12 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 23:27 [kvm-unit-tests PATCH 0/8] nVMX: Clean up __enter_guest() and co Sean Christopherson
2020-03-12 23:27 ` [kvm-unit-tests PATCH 1/8] nVMX: Eliminate superfluous entry_failure_handler() wrapper Sean Christopherson
2020-03-12 23:27 ` [kvm-unit-tests PATCH 2/8] nVMX: Refactor VM-Entry "failure" struct into "result" Sean Christopherson
2020-03-18 23:40   ` Krish Sadhukhan
2020-03-19  9:56     ` Paolo Bonzini
2020-03-12 23:27 ` [kvm-unit-tests PATCH 3/8] nVMX: Consolidate non-canonical code in test_canonical() Sean Christopherson
2020-03-12 23:27 ` Sean Christopherson [this message]
2020-03-12 23:27 ` [kvm-unit-tests PATCH 5/8] nVMX: Expose __enter_guest() and consolidate guest state test code Sean Christopherson
2020-03-12 23:27 ` [kvm-unit-tests PATCH 6/8] nVMX: Pass exit reason union to v1 exit handlers Sean Christopherson
2020-03-12 23:27 ` [kvm-unit-tests PATCH 7/8] nVMX: Pass exit reason union to is_hypercall() Sean Christopherson
2020-03-12 23:27 ` [kvm-unit-tests PATCH 8/8] nVMX: Pass exit reason enum to print_vmexit_info() Sean Christopherson
2020-03-14 10:35 ` [kvm-unit-tests PATCH 0/8] nVMX: Clean up __enter_guest() and co Paolo Bonzini

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=20200312232745.884-5-sean.j.christopherson@intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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;
as well as URLs for NNTP newsgroup(s).