s390x: express dependencies with Kconfig
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 s390x: express dependencies with Kconfig
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new Kconfig files to express the necessary dependencies: The S390_CCW_VIRTIO config switch for the "s390-ccw-virtio" machine now selects all non-optional devices.
And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches for the other two virtio transports, this patch also introduces a new config switch VIRTIO_CCW for the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.
---
This goes on top of the curren Kconfig series:
Based-on: [email protected]
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 2 +- hw/virtio/Kconfig | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-)
default-configs/s390x-softmmu.mak +8 -4
@@ -1,9 +1,13 @@ -CONFIG_PCI=y +# Default configuration for s390x-softmmu + +# Optional devices: +# CONFIG_VIRTIO_PCI=y -CONFIG_SCLPCONSOLE=y CONFIG_TERMINAL3270=y -CONFIG_S390_FLIC=y CONFIG_WDT_DIAG288=y -CONFIG_S390_CCW_VIRTIO=y CONFIG_VFIO_CCW=y CONFIG_VFIO_AP=y + +# Boards: +# +CONFIG_S390_CCW_VIRTIO=y
hw/s390x/Kconfig +4 -0
@@ -1,2 +1,6 @@ config S390_CCW_VIRTIO bool + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCW
hw/s390x/Makefile.objs +1 -1
@@ -8,7 +8,7 @@ obj-y += ipl.o obj-y += css.o obj-y += s390-virtio-ccw.o obj-y += 3270-ccw.o -obj-y += virtio-ccw.o +obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o
hw/virtio/Kconfig +4 -0
@@ -16,6 +16,10 @@ config VIRTIO_MMIO bool select VIRTIO +config VIRTIO_CCW + bool + select VIRTIO + config VIRTIO_BALLOON bool default y
Signature · 1 line
1.8.3.1
Quoted 9 lines · On Mon, 28 Jan 2019 16:29:26 +0100 Thomas Huth <[email protected]> wrote:
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new
Kconfigfiles to express the necessary dependencies: TheS390_CCW_VIRTIOconfig switch for the "s390-ccw-virtio" machine now selects all non-optional devices.And since we already have the
VIRTIO_PCIandVIRTIO_MMIOconfig switches for the other two virtio transports, this patch also introduces a new config switchVIRTIO_CCWfor the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.
I haven't found time to look at the Kconfig patches, so take the following with a generous amount of salt.
Quoted 21 lines
Signed-off-by Thomas Huth <[email protected]>---
This goes on top of the currenKconfigseries:Based-on: [email protected]
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 2 +- hw/virtio/Kconfig | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-)default-configs/s390x-softmmu.mak +2
-1@@ -1,9 +1,13 @@ -CONFIG_PCI=y +# Default configuration for s390x-softmmu +
default-configs/s390x-softmmu.mak line 9
Quoted 10 lines
default-configs/s390x-softmmu.mak +2
-3+# Optional devices: +# CONFIG_VIRTIO_PCI=y -CONFIG_SCLPCONSOLE=y CONFIG_TERMINAL3270=y -CONFIG_S390_FLIC=y CONFIG_WDT_DIAG288=y -CONFIG_S390_CCW_VIRTIO=y CONFIG_VFIO_CCW=y CONFIG_VFIO_AP=y
This looks sensible.
Quoted 9 lines
default-configs/s390x-softmmu.mak +4
-0+ +# Boards: +# +CONFIG_S390_CCW_VIRTIO=yhw/s390x/Kconfig +0
-0
hw/s390x/Kconfig line 6
Quoted 6 lines
hw/s390x/Kconfig +4
-0@@ -1,2 +1,6 @@ config S390_CCW_VIRTIO bool + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCW
This also makes sense. (I assume CONFIG_PCI, CONFIG_S390_FLIC, and CONFIG_SCLPCONSOLE are already defined in the base patch series.)
hw/s390x/Makefile.objs obj-y += ipl.o · line 10
Quoted 8 lines
hw/s390x/Makefile.objs +0
-0@@ -8,7 +8,7 @@ obj-y += ipl.o obj-y += css.o obj-y += s390-virtio-ccw.o obj-y += 3270-ccw.o
Should this depend on TERMINAL3270 (at least in the future)?
hw/s390x/Makefile.objs obj-y += ipl.o · line 12
Quoted 3 lines
hw/s390x/Makefile.objs +1
-1-obj-y += virtio-ccw.o +obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
Hm. Should the individual device types depend both on VIRTIO_<device> and on VIRTIO_CCW? Making VIRTIO_<device> depend on VIRTIO_PCI || VIRTIO_CCW || VIRTIO_MMIO is probably not enough, as we could be trying to build virtio-ccw devices if only VIRTIO_PCI is set (or virtio-pci devices if only VIRTIO_CCW is set, for that matter.)
Or maybe I simply need to read the patches and find the answer there :)
Quoted 17 lines
hw/s390x/Makefile.objs +0
-0obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.ohw/virtio/Kconfig +4
-0@@ -16,6 +16,10 @@ config VIRTIO_MMIO bool select VIRTIO +config VIRTIO_CCW + bool + select VIRTIO + config VIRTIO_BALLOON bool default y
Quoted 60 lines · Cornelia Huck
Quoted 9 lines · On Mon, 28 Jan 2019 16:29:26 +0100 Thomas Huth <[email protected]> wrote:
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new
Kconfigfiles to express the necessary dependencies: TheS390_CCW_VIRTIOconfig switch for the "s390-ccw-virtio" machine now selects all non-optional devices.And since we already have the
VIRTIO_PCIandVIRTIO_MMIOconfig switches for the other two virtio transports, this patch also introduces a new config switchVIRTIO_CCWfor the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.I haven't found time to look at the
Kconfigpatches, so take the following with a generous amount of salt.Quoted 21 lines
Signed-off-by Thomas Huth <[email protected]>---
This goes on top of the currenKconfigseries:Based-on: [email protected]
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 2 +- hw/virtio/Kconfig | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-)default-configs/s390x-softmmu.mak +2
-1@@ -1,9 +1,13 @@ -CONFIG_PCI=y +# Default configuration for s390x-softmmu +default-configs/s390x-softmmu.mak line 9
Quoted 10 lines
default-configs/s390x-softmmu.mak +2
-3+# Optional devices: +# CONFIG_VIRTIO_PCI=y -CONFIG_SCLPCONSOLE=y CONFIG_TERMINAL3270=y -CONFIG_S390_FLIC=y CONFIG_WDT_DIAG288=y -CONFIG_S390_CCW_VIRTIO=y CONFIG_VFIO_CCW=y CONFIG_VFIO_AP=yThis looks sensible.
Quoted 10 lines
default-configs/s390x-softmmu.mak +4
-0+ +# Boards: +# +CONFIG_S390_CCW_VIRTIO=yhw/s390x/Kconfig +0
-0@@ -1,2 +1,6 @@ config S390_CCW_VIRTIO
Quoted 8 lines
hw/s390x/Kconfig line 6
Quoted 5 lines
hw/s390x/Kconfig +4
-0bool + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCWThis also makes sense. (I assume
CONFIG_PCI,CONFIG_S390_FLIC, andCONFIG_SCLPCONSOLEare already defined in the base patch series.)
Yes, they are.
Quoted 10 lines
hw/s390x/Makefile.objs obj-y += ipl.o · line 10
Quoted 8 lines
hw/s390x/Makefile.objs +0
-0@@ -8,7 +8,7 @@ obj-y += ipl.o obj-y += css.o obj-y += s390-virtio-ccw.o obj-y += 3270-ccw.oShould this depend on TERMINAL3270 (at least in the future)?
Yes, this is related to TERMINAL3270 which is already used for hw/char/terminal3270. So I think we could use $(CONFIG_TERMINAL3270) here, too.
Quoted 9 lines
hw/s390x/Makefile.objs obj-y += ipl.o · line 12
Quoted 3 lines
hw/s390x/Makefile.objs +1
-1-obj-y += virtio-ccw.o +obj-$(CONFIG_VIRTIO_CCW) += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.oHm. Should the individual device types depend both on VIRTIO_<device> and on
VIRTIO_CCW? Making VIRTIO_<device> depend onVIRTIO_PCI||VIRTIO_CCW||VIRTIO_MMIOis probably not enough, as we could be trying to build virtio-ccw devices if onlyVIRTIO_PCIis set (or virtio-pci devices if onlyVIRTIO_CCWis set, for that matter.)
You're right, the whole section should be fenced via
ifeq ($(CONFIG_VIRTIO_CCW),y)
...
endif
I'll update my patch accordingly and send a v2.
Thanks,
Thomas
PATCH v2 1/1 s390x: express dependencies with Kconfig
In reply to Cornelia HuckInstead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new Kconfig files to express the necessary dependencies: The S390_CCW_VIRTIO config switch for the "s390-ccw-virtio" machine now selects all non-optional devices.
And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches for the other two virtio transports, this patch also introduces a new config switch VIRTIO_CCW for the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.
---
v2:
- Use CONFIG_TERMINAL3270 for 3270-ccw.o
- Use CONFIG_VIRTIO_CCW for all related devices in the Makefile
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-)
default-configs/s390x-softmmu.mak +8 -4
@@ -1,9 +1,13 @@ -CONFIG_PCI=y +# Default configuration for s390x-softmmu + +# Optional devices: +# CONFIG_VIRTIO_PCI=y -CONFIG_SCLPCONSOLE=y CONFIG_TERMINAL3270=y -CONFIG_S390_FLIC=y CONFIG_WDT_DIAG288=y -CONFIG_S390_CCW_VIRTIO=y CONFIG_VFIO_CCW=y CONFIG_VFIO_AP=y + +# Boards: +# +CONFIG_S390_CCW_VIRTIO=y
hw/s390x/Kconfig +4 -0
@@ -1,2 +1,6 @@ config S390_CCW_VIRTIO bool + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCW
hw/s390x/Makefile.objs +3 -1
@@ -7,7 +7,8 @@ obj-y += sclpcpu.o obj-y += ipl.o obj-y += css.o obj-y += s390-virtio-ccw.o -obj-y += 3270-ccw.o +obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o +ifeq ($(CONFIG_VIRTIO_CCW),y) obj-y += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
@@ -20,6 +21,7 @@ obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o +endif obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/virtio/Kconfig +4 -0
@@ -16,6 +16,10 @@ config VIRTIO_MMIO bool select VIRTIO +config VIRTIO_CCW + bool + select VIRTIO + config VIRTIO_BALLOON bool default y
Signature · 1 line
1.8.3.1
Quoted 16 lines · On Tue, 29 Jan 2019 10:42:14 +0100 Thomas Huth <[email protected]> wrote:
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new
Kconfigfiles to express the necessary dependencies: TheS390_CCW_VIRTIOconfig switch for the "s390-ccw-virtio" machine now selects all non-optional devices.And since we already have the
VIRTIO_PCIandVIRTIO_MMIOconfig switches for the other two virtio transports, this patch also introduces a new config switchVIRTIO_CCWfor the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.Signed-off-by Thomas Huth <[email protected]>---
v2:
- UseCONFIG_TERMINAL3270for 3270-ccw.o
- UseCONFIG_VIRTIO_CCWfor all related devices in theMakefile
Quoted 5 lines
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-)
Looks sane to me.
As I have not looked into the Kconfig infrastructure, I don't feel comfortable enough to give a R-b, but have a
Quoted 25 lines · Cornelia Huck
Quoted 16 lines · On Tue, 29 Jan 2019 10:42:14 +0100 Thomas Huth <[email protected]> wrote:
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new
Kconfigfiles to express the necessary dependencies: TheS390_CCW_VIRTIOconfig switch for the "s390-ccw-virtio" machine now selects all non-optional devices.And since we already have the
VIRTIO_PCIandVIRTIO_MMIOconfig switches for the other two virtio transports, this patch also introduces a new config switchVIRTIO_CCWfor the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.Signed-off-by Thomas Huth <[email protected]>---
v2:
- UseCONFIG_TERMINAL3270for 3270-ccw.o
- UseCONFIG_VIRTIO_CCWfor all related devices in theMakefileQuoted 5 lines
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-)
Quoted 7 lines
Looks sane to me.
As I have not looked into the
Kconfiginfrastructure, I don't feel comfortable enough to give a R-b, but have aAcked-by Cornelia Huck <[email protected]>
Thanks. Yang, can you integrate it into the next version?
Paolo
Quoted 28 lines · Paolo Bonzini
Quoted 27 lines · Cornelia Huck
Quoted 16 lines · On Tue, 29 Jan 2019 10:42:14 +0100 Thomas Huth <[email protected]> wrote:
Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new
Kconfigfiles to express the necessary dependencies: TheS390_CCW_VIRTIOconfig switch for the "s390-ccw-virtio" machine now selects all non-optional devices.And since we already have the
VIRTIO_PCIandVIRTIO_MMIOconfig switches for the other two virtio transports, this patch also introduces a new config switchVIRTIO_CCWfor the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way.Signed-off-by Thomas Huth <[email protected]>---
v2:
- UseCONFIG_TERMINAL3270for 3270-ccw.o
- UseCONFIG_VIRTIO_CCWfor all related devices in theMakefileQuoted 5 lines
default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-)Looks sane to me.
Quoted 8 lines
Quoted 5 lines
As I have not looked into the
Kconfiginfrastructure, I don't feel comfortable enough to give a R-b, but have aAcked-by Cornelia Huck <[email protected]>Thanks. Yang, can you integrate it into the next version?
Yes, i will integrate this patch into Kconfig series patches. thanks all!
Regards,
Yang
Quoted 1 line
Paolo
cover Kconfig dependencies for ppc machines
In reply to a message not in the archiveHere's now my stab at expressing the ppc machine dependencies with Kconfig. I've carefully stepped through the dependencies and tried to built each machine separately (which should be possible now, apart from some few quirks like the RTAS dependency in qtest.c which I will address later).
Yang, unless there are complaints, could you please add these patches to your Kconfig series? Thanks!
Thomas Huth (5):
ppc64: Express dependencies of 'pseries' and 'powernv' machines with
kconfig
ppc: Express dependencies of the 'prep' and '40p' machines with
kconfig
ppc: Express dependencies of the Mac machines with kconfig
ppc: Express dependencies of the Sam460EX machines with kconfig
ppc: Express dependencies of the embedded machines with kconfig
default-configs/ppc-softmmu.mak | 51 +++------------------------------------ default-configs/ppc64-softmmu.mak | 7 ------ hw/display/Kconfig | 1 + hw/intc/Kconfig | 4 +-- hw/mem/Kconfig | 1 + hw/misc/Kconfig | 8 ++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 ++- hw/ppc/Kconfig | 48 ++++++++++++++++++++++++++++++++++++ hw/usb/Kconfig | 2 +- 10 files changed, 69 insertions(+), 59 deletions(-)
Signature · 1 line
1.8.3.1
RFC PATCH 1/5 ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
The POWERNV switch should always select ISA_IPMI_BT, then the other IPMI options are turned on automatically now.CONFIG_DIMM should always be selected by the pseries machine, which in turn depends on CONFIG_MEM_DEVICE since DIMM implements this interface.CONFIG_VIRTIO_VGA can be dropped from default-configs/ppc64-softmmu.mak completely since this device is already automatically enabled via hw/display/Kconfig now.CONFIG_SPAPR_RNG should stay in the ppc-softmmu.mak file since this is a completely optional device.
--- default-configs/ppc64-softmmu.mak | 7 ------- hw/intc/Kconfig | 4 +--- hw/mem/Kconfig | 1 + hw/ppc/Kconfig | 9 +++++++++ 4 files changed, 11 insertions(+), 10 deletions(-)
default-configs/ppc64-softmmu.mak +0 -7
@@ -5,14 +5,7 @@ include ppc-softmmu.mak # For PowerNV CONFIG_POWERNV=y -CONFIG_IPMI=y -CONFIG_IPMI_LOCAL=y -CONFIG_IPMI_EXTERN=y -CONFIG_ISA_IPMI_BT=y # For pSeries CONFIG_PSERIES=y -CONFIG_VIRTIO_VGA=y -CONFIG_MEM_DEVICE=y -CONFIG_DIMM=y CONFIG_SPAPR_RNG=y
hw/intc/Kconfig +1 -3
@@ -31,13 +31,11 @@ config OPENPIC_KVM config XICS bool - default y - depends on PSERIES config XICS_SPAPR bool default y - depends on PSERIES + depends on XICS && PSERIES config XICS_KVM bool
hw/mem/Kconfig +1 -0
@@ -1,5 +1,6 @@ config DIMM bool + select MEM_DEVICE config MEM_DEVICE bool
hw/ppc/Kconfig +9 -0
@@ -1,11 +1,20 @@ config PSERIES bool + select DIMM + select PCI + select VFIO + select XICS config SPAPR_RNG bool + depends on PSERIES config POWERNV bool + select ISA_IPMI_BT + select ISA_BUS + select MC146818RTC + select XICS config PPC405 bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
Quoted 2 lines · Thomas Huth
CONFIG_SPAPR_RNGshould stay in the ppc-softmmu.mak file since this is a completely optional device.
What about making it
default y
and adding to the .mak file this:
#CONFIG_SPAPR_RNG=n
I think the two approaches are more or less equivalent, but "#CONFIG_FOO=n" has a small advantage when the feature has a build-time dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL. In that case,
CONFIG_MILKYMIST_TMU2=y
would report a contradiction if OpenGL is not available at build time, while
default y
...
#CONFIG_MILKYMIST_TMU2=n
would not.
In any case, there are many many such cases in x86 (QXL, HYPERV, FDC, SEV, ISA_IPMI_*, APPLESMC, SGA, HPET, VTD, AMD_IOMMU, PVPANIC, TPM_TIS, TPM_CRB) and they should be handled in the same way---and especially they should be mentioned in the default-configs/ file under "Optional devices". So thanks for noticing this case!
Paolo
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
Quoted 19 lines · Paolo Bonzini
Quoted 2 lines · Thomas Huth
CONFIG_SPAPR_RNGshould stay in the ppc-softmmu.mak file since this is a completely optional device.What about making it
default y
and adding to the .mak file this:
#CONFIG_SPAPR_RNG=n
I think the two approaches are more or less equivalent, but "#CONFIG_FOO=n" has a small advantage when the feature has a build-time dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL. In that case,
CONFIG_MILKYMIST_TMU2=y
Quoted 7 lines
would report a contradiction if OpenGL is not available at build time, while
default y ... #CONFIG_MILKYMIST_TMU2=nwould not.
I somehow dislike the idea of adding lines that are commented out by default. For example, if someone later renames or removes the config switch in the Kconfig files, the comment could stay there without being noticed, while a CONFIG_XXX=y would cause a clean build failure if the option is not available anymore.
Thomas
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
Quoted 13 lines · Thomas Huth
Quoted 13 lines
I think the two approaches are more or less equivalent, but "#CONFIG_FOO=n" has a small advantage when the feature has a build-time dependency, such as CONFIG_MILKYMIST_TMU2's dependency on OpenGL. In that case,
CONFIG_MILKYMIST_TMU2=ywould report a contradiction if OpenGL is not available at build time, while
default y ... #CONFIG_MILKYMIST_TMU2=n
Quoted 6 lines
Quoted 1 line
would not.
I somehow dislike the idea of adding lines that are commented out by default. For example, if someone later renames or removes the config switch in the
Kconfigfiles, the comment could stay there without being noticed, while aCONFIG_XXX=ywould cause a clean build failure if the option is not available anymore.
I agree. On the other hand I don't see another solution for the MILKYMIST_TMU2 and QXL cases, and consistency is a plus too.
How often are config switches renamed or removed, especially user-visible optional devices though? I see CONFIG_MEM_DEVICE, CONFIG_PCI_APB, CONFIG_LIBDECNUMBER, CONFIG_XEN_I386, CONFIG_MIPS_BOSTON, CONFIG_PIIX_PCI, CONFIG_ISA_MMIO, CONFIG_ICC_BUS over the last few years but none probably would have been optional devices in default-configs/ but rather in Kconfig files.
(Long term default-configs/ should probably be built automatically, possibly by adding a description field to the Kconfig files, and that would also ameliorate the issue you describe).
Paolo
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
In reply to Thomas HuthQuoted 74 lines · Thomas Huth
The POWERNV switch should always select
ISA_IPMI_BT, then the other IPMI options are turned on automatically now.CONFIG_DIMMshould always be selected by the pseries machine, which in turn depends onCONFIG_MEM_DEVICEsince DIMM implements this interface.CONFIG_VIRTIO_VGAcan be dropped from default-configs/ppc64-softmmu.mak completely since this device is already automatically enabled via hw/display/Kconfig now.CONFIG_SPAPR_RNGshould stay in the ppc-softmmu.mak file since this is a completely optional device.Cc Cédric Le Goater <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- default-configs/ppc64-softmmu.mak | 7 ------- hw/intc/Kconfig | 4 +--- hw/mem/Kconfig | 1 + hw/ppc/Kconfig | 9 +++++++++ 4 files changed, 11 insertions(+), 10 deletions(-)default-configs/ppc64-softmmu.mak +0
-7@@ -5,14 +5,7 @@ include ppc-softmmu.mak # For PowerNV CONFIG_POWERNV=y -CONFIG_IPMI=y -CONFIG_IPMI_LOCAL=y -CONFIG_IPMI_EXTERN=y -CONFIG_ISA_IPMI_BT=y # For pSeries CONFIG_PSERIES=y -CONFIG_VIRTIO_VGA=y -CONFIG_MEM_DEVICE=y -CONFIG_DIMM=y CONFIG_SPAPR_RNG=yhw/intc/Kconfig +1
-3@@ -31,13 +31,11 @@ config OPENPIC_KVM config XICS bool - default y - depends on PSERIES config XICS_SPAPR bool default y - depends on PSERIES + depends on XICS && PSERIES config XICS_KVM boolhw/mem/Kconfig +1
-0@@ -1,5 +1,6 @@ config DIMM bool + select MEM_DEVICE config MEM_DEVICE boolhw/ppc/Kconfig +0
-0
hw/ppc/Kconfig line 6
Quoted 6 lines
hw/ppc/Kconfig +4
-0@@ -1,11 +1,20 @@ config PSERIES bool + select DIMM + select PCI + select VFIO + select XICS
Don't we want XICS_SPAPR ? or is there another toggle with KVM ?
hw/ppc/Kconfig line 14
Quoted 7 lines
hw/ppc/Kconfig +2
-0config SPAPR_RNG bool + depends on PSERIES config POWERNV bool + select ISA_IPMI_BT
yes.
It is possible to start a PowerNV machine without defining a BT device but the machine relies on the BT device and the IPMI backend attached to it to powerdown.
Ideally I would have preferred to define the device internally in the machine and plug it on the ISA bus but I couldn't find a way to do it cleanly.
hw/ppc/Kconfig line 17
Quoted 3 lines
hw/ppc/Kconfig +3
-0+ select ISA_BUS + select MC146818RTC + select XICS
only for POWER8 machines. POWER9 uses XIVE.
Thanks,
C.
Quoted 4 lines
hw/ppc/Kconfig +0
-0config PPC405 bool
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
Quoted 102 lines · Cédric Le Goater
Quoted 74 lines · Thomas Huth
The POWERNV switch should always select
ISA_IPMI_BT, then the other IPMI options are turned on automatically now.CONFIG_DIMMshould always be selected by the pseries machine, which in turn depends onCONFIG_MEM_DEVICEsince DIMM implements this interface.CONFIG_VIRTIO_VGAcan be dropped from default-configs/ppc64-softmmu.mak completely since this device is already automatically enabled via hw/display/Kconfig now.CONFIG_SPAPR_RNGshould stay in the ppc-softmmu.mak file since this is a completely optional device.Cc Cédric Le Goater <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- default-configs/ppc64-softmmu.mak | 7 ------- hw/intc/Kconfig | 4 +--- hw/mem/Kconfig | 1 + hw/ppc/Kconfig | 9 +++++++++ 4 files changed, 11 insertions(+), 10 deletions(-)default-configs/ppc64-softmmu.mak +0
-7@@ -5,14 +5,7 @@ include ppc-softmmu.mak # For PowerNV CONFIG_POWERNV=y -CONFIG_IPMI=y -CONFIG_IPMI_LOCAL=y -CONFIG_IPMI_EXTERN=y -CONFIG_ISA_IPMI_BT=y # For pSeries CONFIG_PSERIES=y -CONFIG_VIRTIO_VGA=y -CONFIG_MEM_DEVICE=y -CONFIG_DIMM=y CONFIG_SPAPR_RNG=yhw/intc/Kconfig +1
-3@@ -31,13 +31,11 @@ config OPENPIC_KVM config XICS bool - default y - depends on PSERIES config XICS_SPAPR bool default y - depends on PSERIES + depends on XICS && PSERIES config XICS_KVM boolhw/mem/Kconfig +1
-0@@ -1,5 +1,6 @@ config DIMM bool + select MEM_DEVICE config MEM_DEVICE boolhw/ppc/Kconfig +0
-0hw/ppc/Kconfig line 6
Quoted 6 lines
hw/ppc/Kconfig +4
-0@@ -1,11 +1,20 @@ config PSERIES bool + select DIMM + select PCI + select VFIO + select XICSDon't we want
XICS_SPAPR? or is there another toggle with KVM ?hw/ppc/Kconfig line 14
Quoted 7 lines
hw/ppc/Kconfig +2
-0config SPAPR_RNG bool + depends on PSERIES config POWERNV bool + select ISA_IPMI_BTyes.
It is possible to start a PowerNV machine without defining a BT device but the machine relies on the BT device and the IPMI backend attached to it to powerdown.
Ideally I would have preferred to define the device internally in the machine and plug it on the ISA bus but I couldn't find a way to do it cleanly.
Quoted 5 lines
hw/ppc/Kconfig line 17
Quoted 3 lines
hw/ppc/Kconfig +3
-0+ select ISA_BUS + select MC146818RTC + select XICSonly for POWER8 machines. POWER9 uses XIVE.
Sure, but you don't know at compile time yet whether the user wants to use a POWER8 or a POWER9 CPU. So this currently always needs to be selected.
Thomas
Re: [Qemu-devel] [RFC PATCH 1/5] ppc64: Express dependencies of 'pseries' and 'powernv' machines with kconfig
Quoted 103 lines · Thomas Huth
Quoted 102 lines · Cédric Le Goater
Quoted 74 lines · Thomas Huth
The POWERNV switch should always select
ISA_IPMI_BT, then the other IPMI options are turned on automatically now.CONFIG_DIMMshould always be selected by the pseries machine, which in turn depends onCONFIG_MEM_DEVICEsince DIMM implements this interface.CONFIG_VIRTIO_VGAcan be dropped from default-configs/ppc64-softmmu.mak completely since this device is already automatically enabled via hw/display/Kconfig now.CONFIG_SPAPR_RNGshould stay in the ppc-softmmu.mak file since this is a completely optional device.Cc Cédric Le Goater <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- default-configs/ppc64-softmmu.mak | 7 ------- hw/intc/Kconfig | 4 +--- hw/mem/Kconfig | 1 + hw/ppc/Kconfig | 9 +++++++++ 4 files changed, 11 insertions(+), 10 deletions(-)default-configs/ppc64-softmmu.mak +0
-7@@ -5,14 +5,7 @@ include ppc-softmmu.mak # For PowerNV CONFIG_POWERNV=y -CONFIG_IPMI=y -CONFIG_IPMI_LOCAL=y -CONFIG_IPMI_EXTERN=y -CONFIG_ISA_IPMI_BT=y # For pSeries CONFIG_PSERIES=y -CONFIG_VIRTIO_VGA=y -CONFIG_MEM_DEVICE=y -CONFIG_DIMM=y CONFIG_SPAPR_RNG=yhw/intc/Kconfig +1
-3@@ -31,13 +31,11 @@ config OPENPIC_KVM config XICS bool - default y - depends on PSERIES config XICS_SPAPR bool default y - depends on PSERIES + depends on XICS && PSERIES config XICS_KVM boolhw/mem/Kconfig +1
-0@@ -1,5 +1,6 @@ config DIMM bool + select MEM_DEVICE config MEM_DEVICE boolhw/ppc/Kconfig +0
-0hw/ppc/Kconfig line 6
Quoted 6 lines
hw/ppc/Kconfig +4
-0@@ -1,11 +1,20 @@ config PSERIES bool + select DIMM + select PCI + select VFIO + select XICSDon't we want
XICS_SPAPR? or is there another toggle with KVM ?hw/ppc/Kconfig line 14
Quoted 7 lines
hw/ppc/Kconfig +2
-0config SPAPR_RNG bool + depends on PSERIES config POWERNV bool + select ISA_IPMI_BTyes.
It is possible to start a PowerNV machine without defining a BT device but the machine relies on the BT device and the IPMI backend attached to it to powerdown.
Ideally I would have preferred to define the device internally in the machine and plug it on the ISA bus but I couldn't find a way to do it cleanly.
Quoted 8 lines
Quoted 5 lines
hw/ppc/Kconfig line 17
Quoted 3 lines
hw/ppc/Kconfig +3
-0+ select ISA_BUS + select MC146818RTC + select XICSonly for POWER8 machines. POWER9 uses XIVE.
Sure, but you don't know at compile time yet whether the user wants to use a POWER8 or a POWER9 CPU. So this currently always needs to be selected.
ah yes :) Please add XIVE then. I should get the Pnv model merged one day.
Thanks,
C.
RFC PATCH 2/5 ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
In reply to Thomas HuthSelect the required devices in hw/ppc/Kconfig instead, so that ppc-softmmu.mak only contains the user-selectable PREP switch. Plug-in devices like NE2000_ISA are pulled in automatically by the Kconfig build system now.
--- default-configs/ppc-softmmu.mak | 8 -------- hw/ppc/Kconfig | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-)
default-configs/ppc-softmmu.mak +0 -8
@@ -57,11 +57,3 @@ CONFIG_MAC_NEWWORLD=y # For PReP CONFIG_PREP=y -CONFIG_PREP_PCI=y -CONFIG_RS6000_MC=y -CONFIG_I82374=y -CONFIG_I82378=y -CONFIG_PCKBD=y -CONFIG_NE2000_ISA=y -CONFIG_PC87312=y -CONFIG_CS4231A=y
hw/ppc/Kconfig +8 -0
@@ -30,6 +30,14 @@ config SAM460EX config PREP bool + select CS4231A + select PREP_PCI + select I82374 + select I82378 + select LSI_SCSI_PCI + select M48T59 + select PC87312 + select RS6000_MC config RS6000_MC bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Quoted 1 line · Thomas Huth
+ select
LSI_SCSI_PCI
Should NE2000_ISA and LSI_SCSI_PCI be handled the same? Either rely on "default y" for both, or select both (I think I prefer the former).
Paolo
Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · Thomas Huth
+ select
LSI_SCSI_PCIShould
NE2000_ISAandLSI_SCSI_PCIbe handled the same? Either rely on "default y" for both, or select both (I think I prefer the former).
Yes. IMHO we should use "select XXX" if the machine has a hard requirement for a device, and "default y" if it can also somehow work without the device. In this case, I did not look carefully enough, since it is apparently possible to use the 40p machine also without the LSI controller when you specify "-nodefaults". So I'll remove this in v2 and rely on the "default y" instead.
Thomas
Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Quoted 7 lines · Thomas Huth
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · Thomas Huth
+ select
LSI_SCSI_PCIShould
NE2000_ISAandLSI_SCSI_PCIbe handled the same? Either rely on "default y" for both, or select both (I think I prefer the former).
Quoted 6 lines
Yes. IMHO we should use "select XXX" if the machine has a hard requirement for a device, and "default y" if it can also somehow work without the device. In this case, I did not look carefully enough, since it is apparently possible to use the 40p machine also without the LSI controller when you specify "-nodefaults". So I'll remove this in v2 and rely on the "default y" instead.
Scratch that. The "select LSI_SCSI_PCI" is currently a hard requirement here, otherwise I get a linker error like this:
hw/ppc/prep.c:705: undefined reference to `lsi53c8xx_handle_legacy_cmdline'
So I think we should keep this patch in its current shape. Of course we still can clean that up later, but this should not be part of the initial Kconfig patch series (which is already big enough).
Thomas
Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
Quoted 15 lines · Thomas Huth
Quoted 7 lines · Thomas Huth
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · Thomas Huth
+ select
LSI_SCSI_PCIShould
NE2000_ISAandLSI_SCSI_PCIbe handled the same? Either rely on "default y" for both, or select both (I think I prefer the former).Quoted 6 lines
Yes. IMHO we should use "select XXX" if the machine has a hard requirement for a device, and "default y" if it can also somehow work without the device. In this case, I did not look carefully enough, since it is apparently possible to use the 40p machine also without the LSI controller when you specify "-nodefaults". So I'll remove this in v2 and rely on the "default y" instead.
Quoted 8 lines
Scratch that. The "select
LSI_SCSI_PCI" is currently a hard requirement here, otherwise I get a linker error like this:
hw/ppc/prep.c:705: undefined reference to `lsi53c8xx_handle_legacy_cmdline'So I think we should keep this patch in its current shape. Of course we still can clean that up later, but this should not be part of the initial
Kconfigpatch series (which is already big enough).
Sounds good!
Paolo
Re: [Qemu-devel] [RFC PATCH 2/5] ppc: Express dependencies of the 'prep' and '40p' machines with kconfig
In reply to Thomas HuthQuoted 10 lines · Thomas Huth
Quoted 5 lines · Paolo Bonzini
Quoted 1 line · Thomas Huth
+ select
LSI_SCSI_PCIShould
NE2000_ISAandLSI_SCSI_PCIbe handled the same? Either rely on "default y" for both, or select both (I think I prefer the former).Yes. IMHO we should use "select XXX" if the machine has a hard requirement for a device, and "default y" if it can also somehow work without the device.
I agree.
Paolo
RFC PATCH 3/5 ppc: Express dependencies of the Mac machines with kconfig
In reply to Thomas HuthThis will make it for example easier if the users want to disable one of the two machines for their builds.
--- default-configs/ppc-softmmu.mak | 15 --------------- hw/misc/Kconfig | 8 ++++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 +++- hw/ppc/Kconfig | 7 +++++++ 5 files changed, 20 insertions(+), 16 deletions(-)
default-configs/ppc-softmmu.mak +0 -15
@@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y CONFIG_SMBUS_EEPROM=y # For Macs -CONFIG_ESCC=y -CONFIG_MACIO=y -CONFIG_MACIO_GPIO=y -CONFIG_SUNGEM=y -CONFIG_MOS6522=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_MAC_PMU=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y -CONFIG_IDE_MACIO=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y
hw/misc/Kconfig +8 -0
@@ -59,6 +59,14 @@ config MOS6522 config MACIO bool + select CUDA + select ESCC + select IDE_MACIO + select MACIO_GPIO + select MAC_DBDMA + select MAC_NVRAM + select MAC_PMU + select MOS6522 config IVSHMEM_DEVICE bool
hw/net/Kconfig +2 -0
@@ -85,6 +85,8 @@ config FTGMAC100 config SUNGEM bool + default y if (MAC_OLDWORLD || MAC_NEWWORLD) + depends on PCI config COLDFIRE bool
hw/pci-host/Kconfig +3 -1
@@ -10,8 +10,10 @@ config GRACKLE_PCI bool config UNIN_PCI - select PCI bool + select PCI + select DEC_PCI + select OPENPIC config PPCE500_PCI select PCI
hw/ppc/Kconfig +7 -0
@@ -44,9 +44,16 @@ config RS6000_MC config MAC_OLDWORLD bool + select ADB + select GRACKLE_PCI + select HEATHROW_PIC + select MACIO config MAC_NEWWORLD bool + select ADB + select MACIO + select UNIN_PCI config E500 bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
Quoted 5 lines · Thomas Huth
This will make it for example easier if the users want to disable one of the two machines for their builds.
Cc Mark Cave-Ayland <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Quoted 104 lines
--- default-configs/ppc-softmmu.mak | 15 --------------- hw/misc/Kconfig | 8 ++++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 +++- hw/ppc/Kconfig | 7 +++++++ 5 files changed, 20 insertions(+), 16 deletions(-)default-configs/ppc-softmmu.mak +0
-15@@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y CONFIG_SMBUS_EEPROM=y # For Macs -CONFIG_ESCC=y -CONFIG_MACIO=y -CONFIG_MACIO_GPIO=y -CONFIG_SUNGEM=y -CONFIG_MOS6522=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_MAC_PMU=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y -CONFIG_IDE_MACIO=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=yhw/misc/Kconfig +8
-0@@ -59,6 +59,14 @@ config MOS6522 config MACIO bool + select CUDA + select ESCC + select IDE_MACIO + select MACIO_GPIO + select MAC_DBDMA + select MAC_NVRAM + select MAC_PMU + select MOS6522 config IVSHMEM_DEVICE boolhw/net/Kconfig +2
-0@@ -85,6 +85,8 @@ config FTGMAC100 config SUNGEM bool + default y if (MAC_OLDWORLD || MAC_NEWWORLD) + depends on PCI config COLDFIRE boolhw/pci-host/Kconfig +3
-1@@ -10,8 +10,10 @@ config GRACKLE_PCI bool config UNIN_PCI - select PCI bool + select PCI + select DEC_PCI + select OPENPIC config PPCE500_PCI select PCIhw/ppc/Kconfig +7
-0@@ -44,9 +44,16 @@ config RS6000_MC config MAC_OLDWORLD bool + select ADB + select GRACKLE_PCI + select HEATHROW_PIC + select MACIO config MAC_NEWWORLD bool + select ADB + select MACIO + select UNIN_PCI config E500 bool
Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
In reply to Thomas HuthQuoted 45 lines · Thomas Huth
This will make it for example easier if the users want to disable one of the two machines for their builds.
Cc Mark Cave-Ayland <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- default-configs/ppc-softmmu.mak | 15 --------------- hw/misc/Kconfig | 8 ++++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 +++- hw/ppc/Kconfig | 7 +++++++ 5 files changed, 20 insertions(+), 16 deletions(-)default-configs/ppc-softmmu.mak +0
-15@@ -37,21 +37,6 @@ CONFIG_VGA_CIRRUS=y CONFIG_SMBUS_EEPROM=y # For Macs -CONFIG_ESCC=y -CONFIG_MACIO=y -CONFIG_MACIO_GPIO=y -CONFIG_SUNGEM=y -CONFIG_MOS6522=y -CONFIG_CUDA=y -CONFIG_ADB=y -CONFIG_MAC_NVRAM=y -CONFIG_MAC_DBDMA=y -CONFIG_MAC_PMU=y -CONFIG_HEATHROW_PIC=y -CONFIG_GRACKLE_PCI=y -CONFIG_UNIN_PCI=y -CONFIG_DEC_PCI=y -CONFIG_IDE_MACIO=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=yhw/misc/Kconfig +0
-0@@ -59,6 +59,14 @@ config MOS6522
hw/misc/Kconfig config MOS6522 · line 69
Quoted 10 lines
hw/misc/Kconfig +8
-0config MACIO bool + select CUDA + select ESCC + select IDE_MACIO + select MACIO_GPIO + select MAC_DBDMA + select MAC_NVRAM + select MAC_PMU + select MOS6522
Technically MACIO_GPIO and MAC_PMU are MAC_NEWWORLD only, so we might want to split this down further?
Quoted 39 lines
hw/misc/Kconfig +0
-0config IVSHMEM_DEVICE boolhw/net/Kconfig +2
-0@@ -85,6 +85,8 @@ config FTGMAC100 config SUNGEM bool + default y if (MAC_OLDWORLD || MAC_NEWWORLD) + depends on PCI config COLDFIRE boolhw/pci-host/Kconfig +3
-1@@ -10,8 +10,10 @@ config GRACKLE_PCI bool config UNIN_PCI - select PCI bool + select PCI + select DEC_PCI + select OPENPIC config PPCE500_PCI select PCIhw/ppc/Kconfig +0
-0@@ -44,9 +44,16 @@ config RS6000_MC config MAC_OLDWORLD bool
hw/ppc/Kconfig config RS6000_MC · line 56
Quoted 10 lines
hw/ppc/Kconfig +7
-0+ select ADB + select GRACKLE_PCI + select HEATHROW_PIC + select MACIO config MAC_NEWWORLD bool + select ADB + select MACIO + select UNIN_PCI
Also MAC_NEWWORLD has an in-built USB PCI bridge (OHCI) which populates with a USB keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is handled elsewhere?
hw/ppc/Kconfig config RS6000_MC
Quoted 3 lines
hw/ppc/Kconfig +0
-0config E500 bool
ATB,
Mark.
Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
Quoted 8 lines · Mark Cave-Ayland
hw/ppc/Kconfig config RS6000_MC · line 56
Quoted 5 lines
config
MAC_NEWWORLD
boolhw/ppc/Kconfig +3
-0+ select ADB + select MACIO + select UNIN_PCIAlso
MAC_NEWWORLDhas an in-built USB PCI bridge (OHCI) which populates with a USB keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is handled elsewhere?
I guess in that case it's optional, and it is enabled already by CONFIG_PCI_DEVICES.
But maybe it's a good idea to mark OHCI as "default y on PCI_DEVICES || MAC_NEWWORLD" just to document things better.
Paolo
Re: [Qemu-devel] [RFC PATCH 3/5] ppc: Express dependencies of the Mac machines with kconfig
In reply to Mark Cave-AylandQuoted 8 lines · Mark Cave-Ayland
Quoted 6 lines · Thomas Huth
This will make it for example easier if the users want to disable one of the two machines for their builds.
Cc Mark Cave-Ayland <[email protected]>Signed-off-by Thomas Huth <[email protected]>---
[...]
Quoted 6 lines
Quoted 6 lines
hw/misc/Kconfig +0
-0@@ -59,6 +59,14 @@ config MOS6522
Quoted 13 lines
hw/misc/Kconfig config MOS6522 · line 69
Quoted 10 lines
hw/misc/Kconfig +8
-0config MACIO bool + select CUDA + select ESCC + select IDE_MACIO + select MACIO_GPIO + select MAC_DBDMA + select MAC_NVRAM + select MAC_PMU + select MOS6522Technically
MACIO_GPIOandMAC_PMUareMAC_NEWWORLDonly, so we might want to split this down further?
I can also change the lines into:
select MACIO_GPIO if MAC_NEWWORLD
select MAC_PMU if MAC_NEWWORLD
Quoted 13 lines
Quoted 13 lines
hw/ppc/Kconfig +4
-0@@ -44,9 +44,16 @@ config RS6000_MC config MAC_OLDWORLD bool + select ADB + select GRACKLE_PCI + select HEATHROW_PIC + select MACIO
Quoted 9 lines
hw/ppc/Kconfig config RS6000_MC · line 56
Quoted 5 lines
hw/ppc/Kconfig +3
-0config MAC_NEWWORLD bool + select ADB + select MACIO + select UNIN_PCIAlso
MAC_NEWWORLDhas an in-built USB PCI bridge (OHCI) which populates with a USB keyboard/mouse rather than ADB when using -M mac99,via=pmu, but I presume USB is handled elsewhere?
Yes, in hw/usb/Kconfig we have:
config USB_OHCI
bool
default y if PCI_DEVICES
depends on PCI
select USB
Thomas
RFC PATCH 4/5 ppc: Express dependencies of the Sam460EX machines with kconfig
In reply to Thomas HuthMost of the dependencies are now directly selected by the SAM460EX switch. We can drop CONFIG_VGA_CIRRUS since this device is already selected automatically when CONFIG_PCI_DEVICES is set.
--- default-configs/ppc-softmmu.mak | 10 ---------- hw/display/Kconfig | 1 + hw/ppc/Kconfig | 12 ++++++++++++ hw/usb/Kconfig | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-)
default-configs/ppc-softmmu.mak +0 -10
@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=y -CONFIG_USB_EHCI_SYSBUS=y -CONFIG_SM501=y -CONFIG_DDC=y -CONFIG_IDE_SII3112=y -CONFIG_I2C=y -CONFIG_AT24C=y -CONFIG_BITBANG_I2C=y -CONFIG_M41T80=y -CONFIG_VGA_CIRRUS=y -CONFIG_SMBUS_EEPROM=y # For Macs CONFIG_MAC_OLDWORLD=y
hw/display/Kconfig +1 -0
@@ -76,6 +76,7 @@ config MILKYMIST_TMU2 config SM501 bool depends on I2C + select DDC config TCX bool
hw/ppc/Kconfig +12 -0
@@ -24,9 +24,21 @@ config PPC440 config PPC4XX bool + select BITBANG_I2C + select PCI config SAM460EX bool + select AT24C + select PFLASH_CFI01 + select IDE_SII3112 + select ISA_BUS # FIXME: Currently required for IDE_SII3112 + select M41T80 + select PPC440 + select SM501 + select SMBUS_EEPROM + select USB_EHCI_SYSBUS + select USB_OHCI config PREP bool
hw/usb/Kconfig +1 -1
@@ -21,7 +21,7 @@ config USB_EHCI config USB_EHCI_SYSBUS bool - select USB + select USB_EHCI config USB_XHCI bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
Quoted 6 lines · Thomas Huth
Most of the dependencies are now directly selected by the SAM460EX switch. We can drop
CONFIG_VGA_CIRRUSsince this device is already selected automatically whenCONFIG_PCI_DEVICESis set.Cc BALATON Zoltan <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Quoted 80 lines
--- default-configs/ppc-softmmu.mak | 10 ---------- hw/display/Kconfig | 1 + hw/ppc/Kconfig | 12 ++++++++++++ hw/usb/Kconfig | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-)default-configs/ppc-softmmu.mak +0
-10@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=y -CONFIG_USB_EHCI_SYSBUS=y -CONFIG_SM501=y -CONFIG_DDC=y -CONFIG_IDE_SII3112=y -CONFIG_I2C=y -CONFIG_AT24C=y -CONFIG_BITBANG_I2C=y -CONFIG_M41T80=y -CONFIG_VGA_CIRRUS=y -CONFIG_SMBUS_EEPROM=y # For Macs CONFIG_MAC_OLDWORLD=yhw/display/Kconfig +1
-0@@ -76,6 +76,7 @@ config MILKYMIST_TMU2 config SM501 bool depends on I2C + select DDC config TCX boolhw/ppc/Kconfig +12
-0@@ -24,9 +24,21 @@ config PPC440 config PPC4XX bool + select BITBANG_I2C + select PCI config SAM460EX bool + select AT24C + select PFLASH_CFI01 + select IDE_SII3112 + select ISA_BUS # FIXME: Currently required for IDE_SII3112 + select M41T80 + select PPC440 + select SM501 + select SMBUS_EEPROM + select USB_EHCI_SYSBUS + select USB_OHCI config PREP boolhw/usb/Kconfig +1
-1@@ -21,7 +21,7 @@ config USB_EHCI config USB_EHCI_SYSBUS bool - select USB + select USB_EHCI config USB_XHCI bool
Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
In reply to Thomas HuthHello,
Quoted 57 lines · Thomas Huth
Most of the dependencies are now directly selected by the SAM460EX switch. We can drop
CONFIG_VGA_CIRRUSsince this device is already selected automatically whenCONFIG_PCI_DEVICESis set.Cc BALATON Zoltan <[email protected]>Signed-off-by Thomas Huth <[email protected]>---
default-configs/ppc-softmmu.mak | 10 ---------- hw/display/Kconfig | 1 + hw/ppc/Kconfig | 12 ++++++++++++ hw/usb/Kconfig | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-)default-configs/ppc-softmmu.mak +0
-0@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y # For Sam460ex
CONFIG_SAM460EX=ydefault-configs/ppc-softmmu.mak +0
-10-CONFIG_USB_EHCI_SYSBUS=y -CONFIG_SM501=y -CONFIG_DDC=y -CONFIG_IDE_SII3112=y -CONFIG_I2C=y -CONFIG_AT24C=y -CONFIG_BITBANG_I2C=y -CONFIG_M41T80=y -CONFIG_VGA_CIRRUS=y -CONFIG_SMBUS_EEPROM=y# For Macs
CONFIG_MAC_OLDWORLD=yhw/display/Kconfig +0
-0@@ -76,6 +76,7 @@ config MILKYMIST_TMU2config SM501
bool
depends on I2C
+ select DDCconfig TCX
boolhw/ppc/Kconfig +0
-0@@ -24,9 +24,21 @@ config PPC440config PPC4XX
boolhw/ppc/Kconfig +2
-0+ select BITBANG_I2C + select PCI
Quoted 3 lines
config SAM460EX
bool
+ select AT24C
I don't recognise this as needed. Is it for dependency of something?
hw/ppc/Kconfig config PPC440 · line 35
Quoted 3 lines
hw/ppc/Kconfig +3
-0+ select PFLASH_CFI01 + select IDE_SII3112 + select ISA_BUS # FIXME: Currently required for IDE_SII3112
This is not really a dependency of SII3112 but of ide/core so this maybe this belongs to IDE config?
Otherwise I don't care much if it still compiles so
Regards,
BALATON Zoltan
Quoted 23 lines
hw/ppc/Kconfig +6
-0+ select M41T80 + select PPC440 + select SM501 + select SMBUS_EEPROM + select USB_EHCI_SYSBUS + select USB_OHCIconfig PREP
boolhw/usb/Kconfig +0
-0@@ -21,7 +21,7 @@ config USB_EHCIconfig
USB_EHCI_SYSBUS
boolhw/usb/Kconfig +1
-1- select USB + select USB_EHCIconfig
USB_XHCI
bool
Re: [Qemu-devel] [RFC PATCH 4/5] ppc: Express dependencies of the Sam460EX machines with kconfig
Quoted 61 lines · BALATON Zoltan
Hello,
Quoted 58 lines · Thomas Huth
Most of the dependencies are now directly selected by the SAM460EX switch. We can drop
CONFIG_VGA_CIRRUSsince this device is already selected automatically whenCONFIG_PCI_DEVICESis set.Cc BALATON Zoltan <[email protected]>Signed-off-by Thomas Huth <[email protected]>---
default-configs/ppc-softmmu.mak | 10 ----------
hw/display/Kconfig | 1 +
hw/ppc/Kconfig | 12 ++++++++++++
hw/usb/Kconfig | 2 +-4 files changed, 14 insertions(+), 11 deletions(-)default-configs/ppc-softmmu.mak +0
-0@@ -25,16 +25,6 @@ CONFIG_PCI_EXPRESS=y # For Sam460ex
CONFIG_SAM460EX=ydefault-configs/ppc-softmmu.mak +0
-10-CONFIG_USB_EHCI_SYSBUS=y -CONFIG_SM501=y -CONFIG_DDC=y -CONFIG_IDE_SII3112=y -CONFIG_I2C=y -CONFIG_AT24C=y -CONFIG_BITBANG_I2C=y -CONFIG_M41T80=y -CONFIG_VGA_CIRRUS=y -CONFIG_SMBUS_EEPROM=y# For Macs
CONFIG_MAC_OLDWORLD=yhw/display/Kconfig +0
-0@@ -76,6 +76,7 @@ config MILKYMIST_TMU2config SM501
bool
depends on I2C
+ select DDCconfig TCX
boolhw/ppc/Kconfig +0
-0@@ -24,9 +24,21 @@ config PPC440config PPC4XX
bool
+ selectBITBANG_I2C
+ select PCI
Quoted 5 lines
Quoted 3 lines
config SAM460EX
bool
+ select AT24CI don't recognise this as needed. Is it for dependency of something?
Oh, sorry, I apparently missed that one up. The device has been added for the e500 machine instead:
https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg03492.html
... so this line belongs to the "config E500" section instead.
Quoted 6 lines
Quoted 3 lines
+ select
PFLASH_CFI01
+ selectIDE_SII3112
+ select ISA_BUS # FIXME: Currently required forIDE_SII3112This is not really a dependency of SII3112 but of ide/core so this maybe this belongs to IDE config?
It definitely needs fixing, that's why I've got a FIXME here :-)
I've now had a closer look, and the problem is that CONFIG_IDE_PCI currently causes ioport.o to be pulled in. That seems unnecessary. I'll continue the discussion in the related patch ("ide: split ioport registration to a separate file")...
Quoted 3 lines
Otherwise I don't care much if it still compiles so
Reviewed-by BALATON Zoltan <[email protected]>
Thanks!
Thomas
RFC PATCH 5/5 ppc: Express dependencies of the embedded machines with kconfig
In reply to Thomas HuthThis makes it much easier if the users want to disable some of the embedded machines for their builds.
--- default-configs/ppc-softmmu.mak | 18 ++++-------------- hw/ppc/Kconfig | 12 ++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-)
default-configs/ppc-softmmu.mak +4 -14
@@ -1,27 +1,17 @@ # Default configuration for ppc-softmmu -CONFIG_PCI=y CONFIG_PCI_DEVICES=y -CONFIG_ISA_BUS=y CONFIG_TEST_DEVICES=y -# For embedded PPCs: -CONFIG_PPC4XX=y -CONFIG_M48T59=y +# FIXME: CONFIG_SERIAL is currently still required to link all of the +# ppc machines (due to the usage of serial_mm_init() in ppc405_uc.c). CONFIG_SERIAL=y -CONFIG_OPENPIC=y -CONFIG_PPCE500_PCI=y -CONFIG_PFLASH_CFI01=y -CONFIG_PFLASH_CFI02=y -CONFIG_XILINX=y -CONFIG_XILINX_ETHLITE=y + +# For embedded PPCs: CONFIG_E500=y -CONFIG_PLATFORM_BUS=y -CONFIG_ETSEC=y CONFIG_PPC405=y CONFIG_PPC440=y CONFIG_VIRTEX=y -CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=y
hw/ppc/Kconfig +12 -0
@@ -18,9 +18,14 @@ config POWERNV config PPC405 bool + select M48T59 + select PFLASH_CFI02 + select PPC4XX config PPC440 bool + select PCI_EXPRESS + select PPC4XX config PPC4XX bool
@@ -69,9 +74,16 @@ config MAC_NEWWORLD config E500 bool + select ETSEC + select OPENPIC + select PLATFORM_BUS + select PPCE500_PCI config VIRTEX bool + select PFLASH_CFI01 + select XILINX + select XILINX_ETHLITE config MAC_DBDMA bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [RFC PATCH 5/5] ppc: Express dependencies of the embedded machines with kconfig
Quoted 5 lines · Thomas Huth
This makes it much easier if the users want to disable some of the embedded machines for their builds.
Cc Edgar E. Iglesias <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Quoted 78 lines
--- default-configs/ppc-softmmu.mak | 18 ++++-------------- hw/ppc/Kconfig | 12 ++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-)default-configs/ppc-softmmu.mak +4
-14@@ -1,27 +1,17 @@ # Default configuration for ppc-softmmu -CONFIG_PCI=y CONFIG_PCI_DEVICES=y -CONFIG_ISA_BUS=y CONFIG_TEST_DEVICES=y -# For embedded PPCs: -CONFIG_PPC4XX=y -CONFIG_M48T59=y +# FIXME: CONFIG_SERIAL is currently still required to link all of the +# ppc machines (due to the usage of serial_mm_init() in ppc405_uc.c). CONFIG_SERIAL=y -CONFIG_OPENPIC=y -CONFIG_PPCE500_PCI=y -CONFIG_PFLASH_CFI01=y -CONFIG_PFLASH_CFI02=y -CONFIG_XILINX=y -CONFIG_XILINX_ETHLITE=y + +# For embedded PPCs: CONFIG_E500=y -CONFIG_PLATFORM_BUS=y -CONFIG_ETSEC=y CONFIG_PPC405=y CONFIG_PPC440=y CONFIG_VIRTEX=y -CONFIG_PCI_EXPRESS=y # For Sam460ex CONFIG_SAM460EX=yhw/ppc/Kconfig +12
-0@@ -18,9 +18,14 @@ config POWERNV config PPC405 bool + select M48T59 + select PFLASH_CFI02 + select PPC4XX config PPC440 bool + select PCI_EXPRESS + select PPC4XX config PPC4XX bool@@ -69,9 +74,16 @@ config MAC_NEWWORLD config E500 bool + select ETSEC + select OPENPIC + select PLATFORM_BUS + select PPCE500_PCI config VIRTEX bool + select PFLASH_CFI01 + select XILINX + select XILINX_ETHLITE config MAC_DBDMA bool
Re: [Qemu-devel] [RFC PATCH 0/5] Kconfig dependencies for ppc machines
In reply to Thomas HuthQuoted 9 lines · Thomas Huth
Here's now my stab at expressing the ppc machine dependencies with
Kconfig. I've carefully stepped through the dependencies and tried to built each machine separately (which should be possible now, apart from some few quirks like the RTAS dependency inqtest.cwhich I will address later).Yang, unless there are complaints, could you please add these patches to your
Kconfigseries? Thanks!
Yes, i will send Kconfig v6 after chinese new year holiday(one week + 2 days vocation). before this holiday, i need send out non-RFC patch 1-27 as Paolo's mentioned in v5.
Regards,
Yang
Quoted 23 lines
Thomas Huth (5):
ppc64: Express dependencies of 'pseries' and 'powernv' machines with
kconfig
ppc: Express dependencies of the 'prep' and '40p' machines with
kconfig
ppc: Express dependencies of the Mac machines with kconfig
ppc: Express dependencies of the Sam460EX machines with kconfig
ppc: Express dependencies of the embedded machines with kconfigdefault-configs/ppc-softmmu.mak | 51 +++------------------------------------ default-configs/ppc64-softmmu.mak | 7 ------ hw/display/Kconfig | 1 + hw/intc/Kconfig | 4 +-- hw/mem/Kconfig | 1 + hw/misc/Kconfig | 8 ++++++ hw/net/Kconfig | 2 ++ hw/pci-host/Kconfig | 4 ++- hw/ppc/Kconfig | 48 ++++++++++++++++++++++++++++++++++++ hw/usb/Kconfig | 2 +- 10 files changed, 69 insertions(+), 59 deletions(-)Signature · 1 line
1.8.3.1