OSDN Git Service

KVM: SVM: Drop unneeded CONFIG_X86_LOCAL_APIC check
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 18 May 2021 14:43:35 +0000 (16:43 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 May 2021 16:47:39 +0000 (18:47 +0200)
AVIC dependency on CONFIG_X86_LOCAL_APIC is dead code since
commit e42eef4ba388 ("KVM: add X86_LOCAL_APIC dependency").

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210518144339.1987982-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.c

index 712b4e0..1c1bf91 100644 (file)
@@ -29,9 +29,7 @@
 
 /* enable / disable AVIC */
 int avic;
-#ifdef CONFIG_X86_LOCAL_APIC
 module_param(avic, int, S_IRUGO);
-#endif
 
 #define SVM_AVIC_DOORBELL      0xc001011b
 
index dfa351e..8c3918a 100644 (file)
@@ -1010,9 +1010,7 @@ static __init int svm_hardware_setup(void)
        }
 
        if (avic) {
-               if (!npt_enabled ||
-                   !boot_cpu_has(X86_FEATURE_AVIC) ||
-                   !IS_ENABLED(CONFIG_X86_LOCAL_APIC)) {
+               if (!npt_enabled || !boot_cpu_has(X86_FEATURE_AVIC)) {
                        avic = false;
                } else {
                        pr_info("AVIC enabled\n");