[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/22] ppc: Fix build with --without-default-devices
From: |
David Gibson |
Subject: |
[PULL 15/22] ppc: Fix build with --without-default-devices |
Date: |
Wed, 6 Jan 2021 14:38:09 +1100 |
From: Greg Kurz <groug@kaod.org>
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. Such reverse dependencies should rather be
handled with a 'select' statement, eg.
config OPENPIC
select OPENPIC_KVM if KVM
or even better by getting rid of the intermediate _KVM config
and directly checking CONFIG_KVM in the meson.build file:
specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'],
if_true: files('openpic_kvm.c'))
Go for the latter with OPENPIC, XICS and XIVE.
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>
Message-Id: <160883056791.253005.14924294027763955653.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/intc/Kconfig | 10 ----------
hw/intc/meson.build | 9 ++++++---
hw/ppc/Kconfig | 5 -----
3 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index 468d548ca7..fa2695e58d 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -30,11 +30,6 @@ config ARM_GIC_KVM
default y
depends on ARM_GIC && KVM
-config OPENPIC_KVM
- bool
- default y
- depends on OPENPIC && KVM
-
config XICS
bool
depends on POWERNV || PSERIES
@@ -43,11 +38,6 @@ config XICS_SPAPR
bool
select XICS
-config XICS_KVM
- bool
- default y
- depends on XICS && KVM
-
config ALLWINNER_A10_PIC
bool
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 68da782ad2..b6c9218908 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -39,7 +39,8 @@ specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true:
files('loongson_lioint
specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gic.c'))
specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_intc.c'))
specific_ss.add(when: 'CONFIG_OMPIC', if_true: files('ompic.c'))
-specific_ss.add(when: 'CONFIG_OPENPIC_KVM', if_true: files('openpic_kvm.c'))
+specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'],
+ if_true: files('openpic_kvm.c'))
specific_ss.add(when: 'CONFIG_POWERNV', if_true: files('xics_pnv.c',
'pnv_xive.c'))
specific_ss.add(when: 'CONFIG_PPC_UIC', if_true: files('ppc-uic.c'))
specific_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_ic.c',
'bcm2836_control.c'))
@@ -50,8 +51,10 @@ specific_ss.add(when: 'CONFIG_SH4', if_true:
files('sh_intc.c'))
specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c'))
specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c'))
specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c'))
-specific_ss.add(when: 'CONFIG_XICS_KVM', if_true: files('xics_kvm.c'))
+specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_XICS'],
+ if_true: files('xics_kvm.c'))
specific_ss.add(when: 'CONFIG_XICS_SPAPR', if_true: files('xics_spapr.c'))
specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.c'))
-specific_ss.add(when: 'CONFIG_XIVE_KVM', if_true: files('spapr_xive_kvm.c'))
+specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_XIVE'],
+ if_true: files('spapr_xive_kvm.c'))
specific_ss.add(when: 'CONFIG_XIVE_SPAPR', if_true: files('spapr_xive.c'))
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 982d55f587..e35710c7c3 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -139,11 +139,6 @@ config XIVE_SPAPR
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
--
2.29.2
- [PULL 02/22] ppc: Convert PPC UIC to a QOM device, (continued)
- [PULL 02/22] ppc: Convert PPC UIC to a QOM device, David Gibson, 2021/01/05
- [PULL 01/22] hw/ppc/ppc4xx_devs: Make code style fixes to UIC code, David Gibson, 2021/01/05
- [PULL 06/22] spapr/xive: Make spapr_xive_pic_print_info() static, David Gibson, 2021/01/05
- [PULL 05/22] spapr: DRC lookup cannot fail, David Gibson, 2021/01/05
- [PULL 09/22] spapr: Fix buffer overflow in spapr_numa_associativity_init(), David Gibson, 2021/01/05
- [PULL 11/22] spapr: Fix reset of transient DR connectors, David Gibson, 2021/01/05
- [PULL 12/22] spapr: Introduce spapr_drc_reset_all(), David Gibson, 2021/01/05
- [PULL 08/22] spapr: Allow memory unplug to always succeed, David Gibson, 2021/01/05
- [PULL 13/22] spapr: Use spapr_drc_reset_all() at machine reset, David Gibson, 2021/01/05
- [PULL 14/22] spapr: Add drc_ prefix to the DRC realize and unrealize functions, David Gibson, 2021/01/05
- [PULL 15/22] ppc: Fix build with --without-default-devices,
David Gibson <=
- [PULL 16/22] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE, David Gibson, 2021/01/05
- [PULL 07/22] spapr: Fix DR properties of the root node, David Gibson, 2021/01/05
- [PULL 10/22] spapr: Call spapr_drc_reset() for all DRCs at CAS, David Gibson, 2021/01/05
- [PULL 20/22] ppc440_pcix: Improve comment for IRQ mapping, David Gibson, 2021/01/05
- [PULL 19/22] sam460ex: Remove FDT_PPC dependency from KConfig, David Gibson, 2021/01/05
- [PULL 21/22] ppc440_pcix: Fix register write trace event, David Gibson, 2021/01/05
- [PULL 18/22] ppc4xx: Move common dependency on serial to common option, David Gibson, 2021/01/05
- [PULL 17/22] pnv: Fix reverse dependency on PCI express root ports, David Gibson, 2021/01/05
- [PULL 22/22] ppc440_pcix: Fix up pci config access, David Gibson, 2021/01/05
- Re: [PULL 00/22] ppc-for-6.0 queue 20210106, BALATON Zoltan, 2021/01/06