Commit ea2f00c6 authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20220921003201.1441511-9-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a56953e9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -5193,7 +5193,7 @@ static int handle_vmxoff(struct kvm_vcpu *vcpu)


	free_nested(vcpu);
	free_nested(vcpu);


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


	return nested_vmx_succeed(vcpu);
	return nested_vmx_succeed(vcpu);