Skip to content

Commit ea2f00c

Browse files
sean-jcbonzini
authored andcommitted
KVM: nVMX: Make event request on VMXOFF iff INIT/SIPI is pending
Explicitly check for a pending INIT/SIPI event when emulating VMXOFF instead of blindly making an event request. There's obviously no need to evaluate events if none are pending. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220921003201.1441511-9-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent a56953e commit ea2f00c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/x86/kvm/vmx/nested.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5193,8 +5193,8 @@ static int handle_vmxoff(struct kvm_vcpu *vcpu)
51935193

51945194
free_nested(vcpu);
51955195

5196-
/* Process a latched INIT during time CPU was in VMX operation */
5197-
kvm_make_request(KVM_REQ_EVENT, vcpu);
5196+
if (kvm_apic_has_pending_init_or_sipi(vcpu))
5197+
kvm_make_request(KVM_REQ_EVENT, vcpu);
51985198

51995199
return nested_vmx_succeed(vcpu);
52005200
}

0 commit comments

Comments
 (0)