Commit f1577ab2 authored by Maxim Levitsky's avatar Maxim Levitsky Committed by Paolo Bonzini
Browse files

KVM: SVM: svm_set_vintr don't warn if AVIC is active but is about to be deactivated



It is possible for AVIC inhibit and AVIC active state to be mismatched.
Currently we disable AVIC right away on vCPU which started the AVIC inhibit
request thus this warning doesn't trigger but at least in theory,
if svm_set_vintr is called at the same time on multiple vCPUs,
the warning can happen.

Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210713142023.106183-2-mlevitsk@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent bb000f64
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1568,8 +1568,11 @@ static void svm_set_vintr(struct vcpu_svm *svm)
{
	struct vmcb_control_area *control;

	/* The following fields are ignored when AVIC is enabled */
	WARN_ON(kvm_vcpu_apicv_active(&svm->vcpu));
	/*
	 * The following fields are ignored when AVIC is enabled
	 */
	WARN_ON(kvm_apicv_activated(svm->vcpu.kvm));

	svm_set_intercept(svm, INTERCEPT_VINTR);

	/*