KVM: nVMX: Drop a redundant call to vmx_get_intr_info()
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 21 Apr 2020 07:53:27 +0000 (00:53 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Apr 2020 22:24:28 +0000 (18:24 -0400)
Drop nested_vmx_l1_wants_exit()'s initialization of intr_info from
vmx_get_intr_info() that was inadvertantly introduced along with the
caching mechanism.  EXIT_REASON_EXCEPTION_NMI, the only consumer of
intr_info, populates the variable before using it.

Fixes: bb53120d67cd ("KVM: VMX: Cache vmcs.EXIT_INTR_INFO using arch avail_reg flags")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200421075328.14458-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c

index 56074d3..12b7846 100644 (file)
@@ -5691,8 +5691,8 @@ static bool nested_vmx_l0_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
  */
 static bool nested_vmx_l1_wants_exit(struct kvm_vcpu *vcpu, u32 exit_reason)
 {
-       u32 intr_info = vmx_get_intr_info(vcpu);
        struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
+       u32 intr_info;
 
        switch (exit_reason) {
        case EXIT_REASON_EXCEPTION_NMI: