Skip to content

Commit 1331343

Browse files
arndbbonzini
authored andcommitted
KVM: x86: add back X86_LOCAL_APIC dependency
Enabling KVM now causes a build failure on x86-32 if X86_LOCAL_APIC is disabled: arch/x86/kvm/svm/svm.c: In function 'svm_emergency_disable_virtualization_cpu': arch/x86/kvm/svm/svm.c:597:9: error: 'kvm_rebooting' undeclared (first use in this function); did you mean 'kvm_irq_routing'? 597 | kvm_rebooting = true; | ^~~~~~~~~~~~~ | kvm_irq_routing arch/x86/kvm/svm/svm.c:597:9: note: each undeclared identifier is reported only once for each function it appears in make[6]: *** [scripts/Makefile.build:221: arch/x86/kvm/svm/svm.o] Error 1 In file included from include/linux/rculist.h:11, from include/linux/hashtable.h:14, from arch/x86/kvm/svm/avic.c:18: arch/x86/kvm/svm/avic.c: In function 'avic_pi_update_irte': arch/x86/kvm/svm/avic.c:909:38: error: 'struct kvm' has no member named 'irq_routing' 909 | irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu); | ^~ include/linux/rcupdate.h:538:17: note: in definition of macro '__rcu_dereference_check' 538 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ Move the dependency to the same place as before. Fixes: ea4290d ("KVM: x86: leave kvm.ko out of the build if no vendor module is requested") Cc: [email protected] Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Sean Christopherson <[email protected]> [sean: add Cc to stable, tweak shortlog scope] Signed-off-by: Sean Christopherson <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 85434c3 commit 1331343

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ if VIRTUALIZATION
1919

2020
config KVM_X86
2121
def_tristate KVM if KVM_INTEL || KVM_AMD
22-
depends on X86_LOCAL_APIC
2322
select KVM_COMMON
2423
select KVM_GENERIC_MMU_NOTIFIER
2524
select KVM_ELIDE_TLB_FLUSH_IF_YOUNG
@@ -51,6 +50,7 @@ config KVM_X86
5150

5251
config KVM
5352
tristate "Kernel-based Virtual Machine (KVM) support"
53+
depends on X86_LOCAL_APIC
5454
help
5555
Support hosting fully virtualized guest machines using hardware
5656
virtualization extensions. You will need a fairly recent

0 commit comments

Comments
 (0)