]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: x86: Tag APICv DISABLE inhibit, not ABSENT, if APICv is disabled
authorSean Christopherson <seanjc@google.com>
Wed, 20 Apr 2022 01:37:29 +0000 (01:37 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Apr 2022 17:16:12 +0000 (13:16 -0400)
Set the DISABLE inhibit, not the ABSENT inhibit, if APICv is disabled via
module param.  A recent refactoring to add a wrapper for setting/clearing
inhibits unintentionally changed the flag, probably due to a copy+paste
goof.

Fixes: 4f4c4a3ee53c ("KVM: x86: Trace all APICv inhibit changes and capture overall status")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220420013732.3308816-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c

index 51eb27824452949041e83a0e845a22c3ea7199ec..d54d4a67b22695bf8049238982b74e6a441a0efc 100644 (file)
@@ -9111,7 +9111,7 @@ static void kvm_apicv_init(struct kvm *kvm)
 
        if (!enable_apicv)
                set_or_clear_apicv_inhibit(inhibits,
-                                          APICV_INHIBIT_REASON_ABSENT, true);
+                                          APICV_INHIBIT_REASON_DISABLE, true);
 }
 
 static void kvm_sched_yield(struct kvm_vcpu *vcpu, unsigned long dest_id)