Skip to content

Commit f1577ab

Browse files
Maxim Levitskybonzini
authored andcommitted
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: Maxim Levitsky <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent bb000f6 commit f1577ab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,8 +1568,11 @@ static void svm_set_vintr(struct vcpu_svm *svm)
15681568
{
15691569
struct vmcb_control_area *control;
15701570

1571-
/* The following fields are ignored when AVIC is enabled */
1572-
WARN_ON(kvm_vcpu_apicv_active(&svm->vcpu));
1571+
/*
1572+
* The following fields are ignored when AVIC is enabled
1573+
*/
1574+
WARN_ON(kvm_apicv_activated(svm->vcpu.kvm));
1575+
15731576
svm_set_intercept(svm, INTERCEPT_VINTR);
15741577

15751578
/*

0 commit comments

Comments
 (0)