qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ppc: Fix build with --without-default-devices


From: Greg Kurz
Subject: [PATCH] ppc: Fix build with --without-default-devices
Date: Wed, 23 Dec 2020 09:10:44 +0100
User-agent: StGit/0.21

Linking of the qemu-system-ppc64 fails on a POWER9 host when
--without-default-devices is passed to configure:

$ ./configure --without-default-devices \
              --target-list=ppc64-softmmu && make

...

libqemu-ppc64-softmmu.fa.p/hw_ppc_e500.c.o: In function `ppce500_init_mpic_kvm':
/home/greg/Work/qemu/qemu-ppc/build/../hw/ppc/e500.c:777: undefined reference 
to `kvm_openpic_connect_vcpu'
libqemu-ppc64-softmmu.fa.p/hw_ppc_spapr_irq.c.o: In function `spapr_irq_check':
/home/greg/Work/qemu/qemu-ppc/build/../hw/ppc/spapr_irq.c:189: undefined 
reference to `xics_kvm_has_broken_disconnect'
libqemu-ppc64-softmmu.fa.p/hw_intc_spapr_xive.c.o: In function 
`spapr_xive_post_load':
/home/greg/Work/qemu/qemu-ppc/build/../hw/intc/spapr_xive.c:530: undefined 
reference to `kvmppc_xive_post_load'

... and tons of other symbols belonging to the KVM backend of the
openpic, XICS and XIVE interrupt controllers.

It turns out that OPENPIC_KVM, XICS_KVM and XIVE_KVM are marked
to depend on KVM but this has no effect when minikconf runs in
allnoconfig mode. The correct way to express that some configuration
A requires some other configuration B to be true is "A select B".

Have OPENPIC, XICS and XIVE to select their KVM counterpart if KVM
is set. While here, fix POWERNV to select XIVE and XICS, just like
PSERIES, and drop the now useless XIVE related config clauses from
hw/ppc/Kconfig.

This went unnoticed so far because CI doesn't test the build with
--without-default-devices and KVM enabled on a POWER host.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/intc/Kconfig |   18 +++++++++++++-----
 hw/ppc/Kconfig  |   17 ++---------------
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index 468d548ca771..0a5c080c4f5c 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -19,6 +19,7 @@ config ARM_GIC
 config OPENPIC
     bool
     select MSI_NONBROKEN
+    select OPENPIC_KVM if KVM
 
 config APIC
     bool
@@ -32,21 +33,28 @@ config ARM_GIC_KVM
 
 config OPENPIC_KVM
     bool
-    default y
-    depends on OPENPIC && KVM
 
 config XICS
     bool
-    depends on POWERNV || PSERIES
+    select XICS_KVM if KVM
 
 config XICS_SPAPR
     bool
     select XICS
 
+config XIVE
+    bool
+    select XIVE_KVM if KVM
+
+config XIVE_SPAPR
+    bool
+    select XIVE
+
 config XICS_KVM
     bool
-    default y
-    depends on XICS && KVM
+
+config XIVE_KVM
+    bool
 
 config ALLWINNER_A10_PIC
     bool
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 982d55f5875c..037d9332e994 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -31,6 +31,8 @@ config POWERNV
     select FDT_PPC
     select PCI_EXPRESS
     select MSI_NONBROKEN
+    select XIVE
+    select XICS
 
 config PPC405
     bool
@@ -129,21 +131,6 @@ config VIRTEX
     select XILINX_ETHLITE
     select FDT_PPC
 
-config XIVE
-    bool
-    depends on POWERNV || PSERIES
-
-config XIVE_SPAPR
-    bool
-    default y
-    depends on PSERIES
-    select XIVE
-
-config XIVE_KVM
-    bool
-    default y
-    depends on XIVE_SPAPR && KVM
-
 # Only used by 64-bit targets
 config FW_CFG_PPC
     bool





reply via email to

[Prev in Thread] Current Thread [Next in Thread]