Kconfig: kvm: allow building without any board
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Apr 2024 19:16:31 +0000 (21:16 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 May 2024 12:16:26 +0000 (14:16 +0200)
KVM code might have to call functions on the PCIDevice that is
passed to kvm_arch_fixup_msi_route().  This fails in the case
where --without-default-devices is used and no board is
configured.  While this is not really a useful configuration,
and therefore setting up stubs for CONFIG_PCI is overkill,
failing the build is impolite.  Just include the PCI
subsystem if kvm_arch_fixup_msi_route() requires it, as
is the case for ARM and x86.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/arm/Kconfig
target/i386/Kconfig

index bf57d739cd133e81cdaa6cf26d4e4400718c659f..5847c5a74a7465942c9cc965ffb344f2d56aef7f 100644 (file)
@@ -9,3 +9,5 @@ config ARM
 config AARCH64
     bool
     select ARM
+    # kvm_arch_fixup_msi_route() needs to access PCIDevice
+    select PCI if KVM
index ce6968906ee414d4532922f2af5e7bcb34c3002e..46898946394e81587ca389b55bd8755ed95d1d5b 100644 (file)
@@ -1,5 +1,7 @@
 config I386
     bool
+    # kvm_arch_fixup_msi_route() needs to access PCIDevice
+    select PCI if KVM
 
 config X86_64
     bool