All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/3] ppc: Fix build with --without-default-devices
@ 2020-12-24 17:22 Greg Kurz
  2020-12-24 17:22 ` [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE Greg Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Greg Kurz @ 2020-12-24 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, Cédric Le Goater, David Gibson

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>
---

The various comments motivated me enough for another round,
which is basically to split the cleanup out to a separate
patch and use CONFIG_PSERIES in hw/intc/meson.build as
suggested by Cedric.

v3: - move cleanup to a separate patch

v2: - check CONFIG_KVM in the meson.build as suggested by Paolo
---
 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 468d548ca771..fa2695e58d56 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 68da782ad2c5..b6c9218908e3 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 982d55f5875c..e35710c7c368 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




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE
  2020-12-24 17:22 [PATCH v3 1/3] ppc: Fix build with --without-default-devices Greg Kurz
@ 2020-12-24 17:22 ` Greg Kurz
  2020-12-30  7:57   ` David Gibson
  2020-12-24 17:23 ` [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports Greg Kurz
  2020-12-30  7:55 ` [PATCH v3 1/3] ppc: Fix build with --without-default-devices David Gibson
  2 siblings, 1 reply; 6+ messages in thread
From: Greg Kurz @ 2020-12-24 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, Cédric Le Goater, David Gibson

Have PSERIES to select XICS and XIVE, and directly check PSERIES
in hw/intc/meson.build to enable build of the XICS and XIVE sPAPR
backends, like POWERNV already does. This allows to get rid of the
intermediate XICS_SPAPR and XIVE_SPAPR.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/intc/Kconfig     |    4 +---
 hw/intc/meson.build |    3 +--
 hw/ppc/Kconfig      |   14 ++------------
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index fa2695e58d56..c18d11142a8f 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -32,11 +32,9 @@ config ARM_GIC_KVM
 
 config XICS
     bool
-    depends on POWERNV || PSERIES
 
-config XICS_SPAPR
+config XIVE
     bool
-    select XICS
 
 config ALLWINNER_A10_PIC
     bool
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index b6c9218908e3..53cba115690f 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -53,8 +53,7 @@ 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_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_PSERIES', if_true: files('xics_spapr.c', 'spapr_xive.c'))
 specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.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 e35710c7c368..a213994ebf5d 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -7,8 +7,8 @@ config PSERIES
     select PCI
     select SPAPR_VSCSI
     select VFIO if LINUX   # needed by spapr_pci_vfio.c
-    select XICS_SPAPR
-    select XIVE_SPAPR
+    select XICS
+    select XIVE
     select MSI_NONBROKEN
     select FDT_PPC
     select CHRP_NVRAM
@@ -129,16 +129,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
-
 # Only used by 64-bit targets
 config FW_CFG_PPC
     bool




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports
  2020-12-24 17:22 [PATCH v3 1/3] ppc: Fix build with --without-default-devices Greg Kurz
  2020-12-24 17:22 ` [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE Greg Kurz
@ 2020-12-24 17:23 ` Greg Kurz
  2020-12-30  7:58   ` David Gibson
  2020-12-30  7:55 ` [PATCH v3 1/3] ppc: Fix build with --without-default-devices David Gibson
  2 siblings, 1 reply; 6+ messages in thread
From: Greg Kurz @ 2020-12-24 17:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, Cédric Le Goater, David Gibson

qemu-system-ppc64 built with --without-default-devices crashes:

Type 'pnv-phb4-root-port' is missing its parent 'pcie-root-port-base'
Aborted (core dumped)

Have POWERNV to select PCIE_PORT. This is done through a
new PCI_POWERNV config in hw/pci-host/Kconfig since POWERNV
doesn't have a direct dependency on PCI. For this reason,
PCI_EXPRESS and MSI_NONBROKEN are also moved under
PCI_POWERNV.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
---
 hw/pci-host/Kconfig     |    5 +++++
 hw/pci-host/meson.build |    2 +-
 hw/ppc/Kconfig          |    3 +--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index 036a61877a73..eb03f0489d08 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -60,3 +60,8 @@ config PCI_BONITO
     select PCI
     select UNIMP
     bool
+
+config PCI_POWERNV
+    select PCI_EXPRESS
+    select MSI_NONBROKEN
+    select PCIE_PORT
diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
index e6d1b896848c..da9d1a9964a8 100644
--- a/hw/pci-host/meson.build
+++ b/hw/pci-host/meson.build
@@ -23,7 +23,7 @@ pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
 
 softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
 
-specific_ss.add(when: 'CONFIG_POWERNV', if_true: files(
+specific_ss.add(when: 'CONFIG_PCI_POWERNV', if_true: files(
   'pnv_phb3.c',
   'pnv_phb3_msi.c',
   'pnv_phb3_pbcq.c',
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index a213994ebf5d..d11dc30509df 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -29,8 +29,7 @@ config POWERNV
     select XICS
     select XIVE
     select FDT_PPC
-    select PCI_EXPRESS
-    select MSI_NONBROKEN
+    select PCI_POWERNV
 
 config PPC405
     bool




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 1/3] ppc: Fix build with --without-default-devices
  2020-12-24 17:22 [PATCH v3 1/3] ppc: Fix build with --without-default-devices Greg Kurz
  2020-12-24 17:22 ` [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE Greg Kurz
  2020-12-24 17:23 ` [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports Greg Kurz
@ 2020-12-30  7:55 ` David Gibson
  2 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2020-12-30  7:55 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, qemu-devel, Cédric Le Goater

[-- Attachment #1: Type: text/plain, Size: 5345 bytes --]

On Thu, Dec 24, 2020 at 06:22:47PM +0100, Greg Kurz wrote:
> 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>

Applied, thanks.

> ---
> 
> The various comments motivated me enough for another round,
> which is basically to split the cleanup out to a separate
> patch and use CONFIG_PSERIES in hw/intc/meson.build as
> suggested by Cedric.
> 
> v3: - move cleanup to a separate patch
> 
> v2: - check CONFIG_KVM in the meson.build as suggested by Paolo
> ---
>  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 468d548ca771..fa2695e58d56 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 68da782ad2c5..b6c9218908e3 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 982d55f5875c..e35710c7c368 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
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE
  2020-12-24 17:22 ` [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE Greg Kurz
@ 2020-12-30  7:57   ` David Gibson
  0 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2020-12-30  7:57 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, qemu-devel, Cédric Le Goater

[-- Attachment #1: Type: text/plain, Size: 2770 bytes --]

On Thu, Dec 24, 2020 at 06:22:55PM +0100, Greg Kurz wrote:
> Have PSERIES to select XICS and XIVE, and directly check PSERIES
> in hw/intc/meson.build to enable build of the XICS and XIVE sPAPR
> backends, like POWERNV already does. This allows to get rid of the
> intermediate XICS_SPAPR and XIVE_SPAPR.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Applied, thanks.

> ---
>  hw/intc/Kconfig     |    4 +---
>  hw/intc/meson.build |    3 +--
>  hw/ppc/Kconfig      |   14 ++------------
>  3 files changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
> index fa2695e58d56..c18d11142a8f 100644
> --- a/hw/intc/Kconfig
> +++ b/hw/intc/Kconfig
> @@ -32,11 +32,9 @@ config ARM_GIC_KVM
>  
>  config XICS
>      bool
> -    depends on POWERNV || PSERIES
>  
> -config XICS_SPAPR
> +config XIVE
>      bool
> -    select XICS
>  
>  config ALLWINNER_A10_PIC
>      bool
> diff --git a/hw/intc/meson.build b/hw/intc/meson.build
> index b6c9218908e3..53cba115690f 100644
> --- a/hw/intc/meson.build
> +++ b/hw/intc/meson.build
> @@ -53,8 +53,7 @@ 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_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_PSERIES', if_true: files('xics_spapr.c', 'spapr_xive.c'))
>  specific_ss.add(when: 'CONFIG_XIVE', if_true: files('xive.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 e35710c7c368..a213994ebf5d 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -7,8 +7,8 @@ config PSERIES
>      select PCI
>      select SPAPR_VSCSI
>      select VFIO if LINUX   # needed by spapr_pci_vfio.c
> -    select XICS_SPAPR
> -    select XIVE_SPAPR
> +    select XICS
> +    select XIVE
>      select MSI_NONBROKEN
>      select FDT_PPC
>      select CHRP_NVRAM
> @@ -129,16 +129,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
> -
>  # Only used by 64-bit targets
>  config FW_CFG_PPC
>      bool
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports
  2020-12-24 17:23 ` [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports Greg Kurz
@ 2020-12-30  7:58   ` David Gibson
  0 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2020-12-30  7:58 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	qemu-ppc, qemu-devel, Cédric Le Goater

[-- Attachment #1: Type: text/plain, Size: 2240 bytes --]

On Thu, Dec 24, 2020 at 06:23:03PM +0100, Greg Kurz wrote:
> qemu-system-ppc64 built with --without-default-devices crashes:
> 
> Type 'pnv-phb4-root-port' is missing its parent 'pcie-root-port-base'
> Aborted (core dumped)
> 
> Have POWERNV to select PCIE_PORT. This is done through a
> new PCI_POWERNV config in hw/pci-host/Kconfig since POWERNV
> doesn't have a direct dependency on PCI. For this reason,
> PCI_EXPRESS and MSI_NONBROKEN are also moved under
> PCI_POWERNV.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>

Applied, thanks.

> ---
>  hw/pci-host/Kconfig     |    5 +++++
>  hw/pci-host/meson.build |    2 +-
>  hw/ppc/Kconfig          |    3 +--
>  3 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index 036a61877a73..eb03f0489d08 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -60,3 +60,8 @@ config PCI_BONITO
>      select PCI
>      select UNIMP
>      bool
> +
> +config PCI_POWERNV
> +    select PCI_EXPRESS
> +    select MSI_NONBROKEN
> +    select PCIE_PORT
> diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
> index e6d1b896848c..da9d1a9964a8 100644
> --- a/hw/pci-host/meson.build
> +++ b/hw/pci-host/meson.build
> @@ -23,7 +23,7 @@ pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
>  
>  softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
>  
> -specific_ss.add(when: 'CONFIG_POWERNV', if_true: files(
> +specific_ss.add(when: 'CONFIG_PCI_POWERNV', if_true: files(
>    'pnv_phb3.c',
>    'pnv_phb3_msi.c',
>    'pnv_phb3_pbcq.c',
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index a213994ebf5d..d11dc30509df 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -29,8 +29,7 @@ config POWERNV
>      select XICS
>      select XIVE
>      select FDT_PPC
> -    select PCI_EXPRESS
> -    select MSI_NONBROKEN
> +    select PCI_POWERNV
>  
>  config PPC405
>      bool
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-30 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 17:22 [PATCH v3 1/3] ppc: Fix build with --without-default-devices Greg Kurz
2020-12-24 17:22 ` [PATCH v3 2/3] ppc: Simplify reverse dependencies of POWERNV and PSERIES on XICS and XIVE Greg Kurz
2020-12-30  7:57   ` David Gibson
2020-12-24 17:23 ` [PATCH v3 3/3] pnv: Fix reverse dependency on PCI express root ports Greg Kurz
2020-12-30  7:58   ` David Gibson
2020-12-30  7:55 ` [PATCH v3 1/3] ppc: Fix build with --without-default-devices David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.