Skip to contentSkip to conversation

hw: Various Kconfig fixes

PATCH Superseded Philippe Mathieu-Daudé 5 participants 34 messages May 13, 2021 – May 16, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hw: Various Kconfig fixes

Various Kconfig fixes when building stand-alone machine binaries.

FYI I'm looking at a way to test this automatically, by generating all the configurations using:
https://docs.gitlab.com/ee/ci/parent_child_pipelines.html#dynamic-child-pipel=
ines
This way we could run this on release candidate tags.

Philippe Mathieu-Daud=C3=A9 (10):
hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on' hw/ide/Kconfig: Add missing dependency PCI -> QDEV hw/arm/Kconfig: Add missing dependency NPCM7XX -> SMBUS hw/arm/Kconfig: Remove unused DS1338 symbol from i.MX25 PDK Board hw/arm/Kconfig: Add missing SDHCI symbol to FSL_IMX25 hw/riscv/Kconfig: Add missing dependency MICROCHIP_PFSOC -> SERIAL hw/riscv/Kconfig: Restrict NUMA to Virt & Spike machines hw/ppc/Kconfig: Add missing dependency E500 -> DS1338 RTC default-configs/devices: Remove implicy SEMIHOSTING config default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is
required

 default-configs/devices/arm-softmmu.mak     | 5 +++--
 default-configs/devices/ppc-softmmu.mak     | 1 -
 default-configs/devices/ppc64-softmmu.mak   | 1 -
 default-configs/devices/riscv32-softmmu.mak | 5 +++--
 default-configs/devices/riscv64-softmmu.mak | 5 +++--
 hw/arm/Kconfig                              | 4 +++-
 hw/i386/Kconfig                             | 1 +
 hw/ide/Kconfig                              | 2 +-
 hw/mem/Kconfig                              | 2 --
 hw/ppc/Kconfig                              | 2 ++
 hw/riscv/Kconfig                            | 6 ++++++
 hw/riscv/meson.build                        | 2 +-
 12 files changed, 23 insertions(+), 13 deletions(-)

--=20
2.26.3

#1 lore raw

PATCH 1/10 hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -1
index ae0841fa3a1..cca52665d90 100644
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +1 -0
index e51e0e5e5ac..66e0b15d9ef 100644
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI
Signature · 1 line
2.26.3
Acked-by on v1 1/10
#2 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Quoted 11 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

ppc part

Quoted 64 lines
---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -1
index ae0841fa3a1..cca52665d90 100644
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +1 -0
index e51e0e5e5ac..66e0b15d9ef 100644
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI
Signature · 4 lines
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
#3 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

In reply to Philippe Mathieu-Daudé
Quoted 25 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -0
index ae0841fa3a1..cca52665d90 100644

default-configs/devices/ppc64-softmmu.mak CONFIG_POWERNV=y · line 11

Quoted 4 lines
default-configs/devices/ppc64-softmmu.mak +0 -1
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any difference of other changes in this patch.

Quoted 40 lines
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +0 -0
index e51e0e5e5ac..66e0b15d9ef 100644

hw/ppc/Kconfig config PSERIES · line 9

Quoted 7 lines
hw/ppc/Kconfig +1 -0
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI

Regards,
Bin

#4 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Quoted 28 lines · Bin Meng
Quoted 26 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -0
index ae0841fa3a1..cca52665d90 100644
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
Quoted 6 lines

default-configs/devices/ppc64-softmmu.mak CONFIG_POWERNV=y · line 11

Quoted 3 lines
default-configs/devices/ppc64-softmmu.mak +0 -1
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any difference of other changes in this patch.

See below "depends on (PC || PSERIES || ARM_VIRT)"

Quoted 52 lines
Quoted 41 lines
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +0 -0
index e51e0e5e5ac..66e0b15d9ef 100644

hw/ppc/Kconfig config PSERIES · line 9

Quoted 7 lines
hw/ppc/Kconfig +1 -0
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI

Regards,
Bin

#5 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Quoted 30 lines · Philippe Mathieu-Daudé
Quoted 28 lines · Bin Meng
Quoted 26 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -0
index ae0841fa3a1..cca52665d90 100644
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
Quoted 8 lines
Quoted 6 lines

default-configs/devices/ppc64-softmmu.mak CONFIG_POWERNV=y · line 11

Quoted 3 lines
default-configs/devices/ppc64-softmmu.mak +0 -1
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any difference of other changes in this patch.

See below "depends on (PC || PSERIES || ARM_VIRT)"

Yes, I saw that. This change does not make any difference compared to "depends on"

Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +0 -0
index e51e0e5e5ac..66e0b15d9ef 100644
Quoted 8 lines
Quoted 8 lines

hw/ppc/Kconfig config PSERIES · line 9

Quoted 8 lines
hw/ppc/Kconfig +1 -0
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI

Regards,
Bin

#6 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Quoted 39 lines · Bin Meng
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 34 lines · Bin Meng
Quoted 25 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -0
index ae0841fa3a1..cca52665d90 100644

default-configs/devices/ppc64-softmmu.mak CONFIG_POWERNV=y · line 11

Quoted 4 lines
default-configs/devices/ppc64-softmmu.mak +0 -1
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any difference of other changes in this patch.

Quoted 4 lines
Quoted 1 line

See below "depends on (PC || PSERIES || ARM_VIRT)"

Yes, I saw that. This change does not make any difference compared to "depends on"

No, there is no logical change indeed. Simply IIUC the documentation "imply" is the preferred form.

Quoted 54 lines
Quoted 42 lines
Quoted 42 lines
Quoted 42 lines
hw/arm/Kconfig +1 -0
index b887f6a5b17..67723d9ea6a 100644
@@ -6,6 +6,7 @@ config ARM_VIRT
     imply VFIO_PLATFORM
     imply VFIO_XGMAC
     imply TPM_TIS_SYSBUS
+    imply NVDIMM
     select ARM_GIC
     select ACPI
     select ARM_SMMUV3
hw/i386/Kconfig +1 -0
index 7f91f30877f..66838fa397b 100644
@@ -23,6 +23,7 @@ config PC
     imply TPM_TIS_ISA
     imply VGA_PCI
     imply VIRTIO_VGA
+    imply NVDIMM
     select FDC
     select I8259
     select I8254
hw/mem/Kconfig +0 -2
index a0ef2cf648e..8b19fdc49f1 100644
@@ -7,6 +7,4 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
-    default y
-    depends on (PC || PSERIES || ARM_VIRT)
     select MEM_DEVICE
hw/ppc/Kconfig +0 -0
index e51e0e5e5ac..66e0b15d9ef 100644
Quoted 8 lines
Quoted 8 lines

hw/ppc/Kconfig config PSERIES · line 9

Quoted 8 lines
hw/ppc/Kconfig +1 -0
@@ -3,6 +3,7 @@ config PSERIES
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_VGA
+    imply NVDIMM
     select DIMM
     select PCI
     select SPAPR_VSCSI

Regards,
Bin

Reviewed-by
#7 lore raw

Re: [PATCH 01/10] hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on'

Quoted 41 lines · Philippe Mathieu-Daudé
Quoted 39 lines · Bin Meng
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 34 lines · Bin Meng
Quoted 25 lines · Philippe Mathieu-Daudé

Per the kconfig.rst:

A device should be listed [...] ``imply`` if (depending on the QEMU command line) the board may or may not be started without it.

This is the case with the NVDIMM device (it is certainly possible to start a machine without NVDIMM) , so use the 'imply' weak reverse dependency to select the symbol.

---
 default-configs/devices/ppc64-softmmu.mak | 1 -
 hw/arm/Kconfig                            | 1 +
 hw/i386/Kconfig                           | 1 +
 hw/mem/Kconfig                            | 2 --
 hw/ppc/Kconfig                            | 1 +
 5 files changed, 3 insertions(+), 3 deletions(-)
default-configs/devices/ppc64-softmmu.mak +0 -0
index ae0841fa3a1..cca52665d90 100644

default-configs/devices/ppc64-softmmu.mak CONFIG_POWERNV=y · line 11

Quoted 4 lines
default-configs/devices/ppc64-softmmu.mak +0 -1
@@ -8,4 +8,3 @@ CONFIG_POWERNV=y
 
 # For pSeries
 CONFIG_PSERIES=y
-CONFIG_NVDIMM=y

I think only removing this one makes sense. I fail to see any difference of other changes in this patch.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

See below "depends on (PC || PSERIES || ARM_VIRT)"

Yes, I saw that. This change does not make any difference compared to "depends on"

No, there is no logical change indeed. Simply IIUC the documentation "imply" is the preferred form.

Okay, per the documentation "imply" is the preferred way over "default y && depends on".

#8 lore raw

PATCH 2/10 hw/ide/Kconfig: Add missing dependency PCI -> QDEV

In reply to Philippe Mathieu-Daudé

The pci_ide_create_devs() function is declared i hw/ide/qdev.c:

 $ git grep ide_create_drive
 hw/ide/pci.c:491:            ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
 hw/ide/qdev.c:127:IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
 include/hw/ide/internal.h:653:IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive);

Fix the correct symbol dependency to avoid build failure when deselecting some machines:

/usr/bin/ld: libcommon.fa.p/hw_ide_pci.c.o: in function `pci_ide_create_devs':
hw/ide/pci.c:491: undefined reference to `ide_create_drive'

Fixes 8f01b41e109 ("ide: express dependencies with Kconfig")
---
 hw/ide/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ide/Kconfig +1 -1
index 8e2c8934549..dd85fa3619f 100644
@@ -8,7 +8,7 @@ config IDE_QDEV
 config IDE_PCI
     bool
     depends on PCI
-    select IDE_CORE
+    select IDE_QDEV
 
 config IDE_ISA
     bool
Signature · 1 line
2.26.3
Reviewed-by on v1 2/10
#9 lore raw

Re: [PATCH 02/10] hw/ide/Kconfig: Add missing dependency PCI -> QDEV

Quoted 11 lines · Philippe Mathieu-Daudé

The pci_ide_create_devs() function is declared i hw/ide/qdev.c:

 $ git grep ide_create_drive
 hw/ide/pci.c:491:            ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
 hw/ide/qdev.c:127:IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
 include/hw/ide/internal.h:653:IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive);

Fix the correct symbol dependency to avoid build failure when deselecting some machines:

Quoted 9 lines

/usr/bin/ld: libcommon.fa.p/hw_ide_pci.c.o: in function `pci_ide_create_devs':
hw/ide/pci.c:491: undefined reference to `ide_create_drive'

Fixes 8f01b41e109 ("ide: express dependencies with Kconfig")
---
 hw/ide/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#10 lore raw

PATCH 3/10 hw/arm/Kconfig: Add missing dependency NPCM7XX -> SMBUS

In reply to Philippe Mathieu-Daudé

The TYPE_NPCM7XX_SMBUS device model exposes an SMBus, but this isn't advertised with proper Kconfig symbol, leading to an early build failure when building NPCM7XX machines standalone:

The following clauses were found for AT24C

config AT24C depends on I2C
select AT24C if NPCM7XX

Fix by adding SMBUS to NPCM7XX.

Fixes 94e77879395 ("hw/i2c: Implement NPCM7XX SMBus Module Single Mode")

---
Cc: Doug Evans<[email protected]>
Cc: Hao Wu <[email protected]>
Cc: Tyrong Ting<[email protected]>
Cc: Corey Minyard <[email protected]>

---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/arm/Kconfig +1 -0
index 67723d9ea6a..85c6a1a088c 100644
@@ -373,6 +373,7 @@ config NPCM7XX
     bool
     select A9MPCORE
     select ARM_GIC
+    select SMBUS
     select AT24C  # EEPROM
     select PL310  # cache controller
     select SERIAL
Signature · 1 line
2.26.3
Reviewed-by on v1 3/10
#11 lore raw

Re: [PATCH 03/10] hw/arm/Kconfig: Add missing dependency NPCM7XX -> SMBUS

Quoted 39 lines · Philippe Mathieu-Daudé

The TYPE_NPCM7XX_SMBUS device model exposes an SMBus, but this isn't advertised with proper Kconfig symbol, leading to an early build failure when building NPCM7XX machines standalone:

The following clauses were found for AT24C

config AT24C depends on I2C
select AT24C if NPCM7XX

Fix by adding SMBUS to NPCM7XX.

Fixes 94e77879395 ("hw/i2c: Implement NPCM7XX SMBus Module Single Mode")

---
Cc: Doug Evans<[email protected]>
Cc: Hao Wu <[email protected]>
Cc: Tyrong Ting<[email protected]>
Cc: Corey Minyard <[email protected]>

---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/arm/Kconfig +1 -1
index 67723d9ea6a..85c6a1a088c 100644
@@ -373,6 +373,7 @@ config NPCM7XX
     bool
     select A9MPCORE
     select ARM_GIC
+    select SMBUS
     select AT24C  # EEPROM
     select PL310  # cache controller
     select SERIAL
--

2.26.3

Reviewed-by on v1 3/10
#12 lore raw

Re: [PATCH 03/10] hw/arm/Kconfig: Add missing dependency NPCM7XX -> SMBUS

In reply to Philippe Mathieu-Daudé
Quoted 15 lines · Philippe Mathieu-Daudé

The TYPE_NPCM7XX_SMBUS device model exposes an SMBus, but this isn't advertised with proper Kconfig symbol, leading to an early build failure when building NPCM7XX machines standalone:

The following clauses were found for AT24C

config AT24C depends on I2C
select AT24C if NPCM7XX

Fix by adding SMBUS to NPCM7XX.

Fixes 94e77879395 ("hw/i2c: Implement NPCM7XX SMBus Module Single Mode")
Quoted 9 lines

---
Cc: Doug Evans<[email protected]>
Cc: Hao Wu <[email protected]>
Cc: Tyrong Ting<[email protected]>
Cc: Corey Minyard <[email protected]>

---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
#13 lore raw

PATCH 4/10 hw/arm/Kconfig: Remove unused DS1338 symbol from i.MX25 PDK Board

In reply to Philippe Mathieu-Daudé

In commit c4f00daa5b3 ("imx25-pdk: create ds1338 for qtest inside the test") we removed the DS1338 device from the i.MX25 machine but forgot to remove it in the machine Kconfig definitions, do it now.

---
 hw/arm/Kconfig | 1 -
 1 file changed, 1 deletion(-)
hw/arm/Kconfig +0 -1
index 85c6a1a088c..5827c092b28 100644
@@ -386,7 +386,6 @@ config FSL_IMX25
     select IMX_FEC
     select IMX_I2C
     select WDT_IMX2
-    select DS1338
 
 config FSL_IMX31
     bool
Signature · 1 line
2.26.3
Reviewed-by on v1 4/10
#14 lore raw

Re: [PATCH 04/10] hw/arm/Kconfig: Remove unused DS1338 symbol from i.MX25 PDK Board

Quoted 11 lines · Philippe Mathieu-Daudé

In commit c4f00daa5b3 ("imx25-pdk: create ds1338 for qtest inside the test") we removed the DS1338 device from the i.MX25 machine but forgot to remove it in the machine Kconfig definitions, do it now.

---
 hw/arm/Kconfig | 1 -
 1 file changed, 1 deletion(-)
#15 lore raw

PATCH 5/10 hw/arm/Kconfig: Add missing SDHCI symbol to FSL_IMX25

In reply to Philippe Mathieu-Daudé

Commit bfae1772c43 ("hw/arm/fsl-imx25: Wire up eSDHC controllers") added a dependency on the TYPE_IMX_USDHC model, but forgot to add the Kconfig selector. Fix that to solve when built stand-alone:

  $ qemu-system-arm -M imx25-pdk
  qemu-system-arm: missing object type 'imx-usdhc'
  Aborted (core dumped)
Fixes bfae1772c43 ("hw/arm/fsl-imx25: Wire up eSDHC controllers")

---
Cc: Guenter Roeck <[email protected]>

---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/arm/Kconfig +1 -0
index 5827c092b28..6bb34926bb5 100644
@@ -386,6 +386,7 @@ config FSL_IMX25
     select IMX_FEC
     select IMX_I2C
     select WDT_IMX2
+    select SDHCI
 
 config FSL_IMX31
     bool
Signature · 1 line
2.26.3
Reviewed-by on v1 5/10
#16 lore raw

Re: [PATCH 05/10] hw/arm/Kconfig: Add missing SDHCI symbol to FSL_IMX25

Quoted 9 lines · Philippe Mathieu-Daudé

Commit bfae1772c43 ("hw/arm/fsl-imx25: Wire up eSDHC controllers") added a dependency on the TYPE_IMX_USDHC model, but forgot to add the Kconfig selector. Fix that to solve when built stand-alone:

  $ qemu-system-arm -M imx25-pdk
  qemu-system-arm: missing object type 'imx-usdhc'
  Aborted (core dumped)
Quoted 8 lines
Fixes bfae1772c43 ("hw/arm/fsl-imx25: Wire up eSDHC controllers")

---
Cc: Guenter Roeck <[email protected]>

---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
#17 lore raw

PATCH 6/10 hw/riscv/Kconfig: Add missing dependency MICROCHIP_PFSOC -> SERIAL

In reply to Philippe Mathieu-Daudé

Commit a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation") added a dependency on the SERIAL model, but forgot to add the Kconfig selector. Fix that to solve when built the MICROCHIP_PFSOC machine stand-alone:

/usr/bin/ld: libcommon.fa.p/hw_char_mchp_pfsoc_mmuart.c.o: in function `mchp_pfsoc_mmuart_create':
hw/char/mchp_pfsoc_mmuart.c:79: undefined reference to `serial_mm_init'

Fixes a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation")

---
Cc: Bin Meng <[email protected]>
Cc: Alistair Francis <[email protected]>

---
 hw/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/riscv/Kconfig +1 -0
index 86957ec7b06..b72a248809e 100644
@@ -12,6 +12,7 @@ config MICROCHIP_PFSOC
     select SIFIVE_CLINT
     select SIFIVE_PDMA
     select SIFIVE_PLIC
+    select SERIAL
     select UNIMP
 
 config OPENTITAN
Signature · 1 line
2.26.3
#18 lore raw

Re: [PATCH 06/10] hw/riscv/Kconfig: Add missing dependency MICROCHIP_PFSOC -> SERIAL

Hi Philippe,

Quoted 23 lines · Philippe Mathieu-Daudé

Commit a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation") added a dependency on the SERIAL model, but forgot to add the Kconfig selector. Fix that to solve when built the MICROCHIP_PFSOC machine stand-alone:

/usr/bin/ld: libcommon.fa.p/hw_char_mchp_pfsoc_mmuart.c.o: in function `mchp_pfsoc_mmuart_create':
hw/char/mchp_pfsoc_mmuart.c:79: undefined reference to `serial_mm_init'

Fixes a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation")

---
Cc: Bin Meng <[email protected]>
Cc: Alistair Francis <[email protected]>

---
 hw/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
hw/riscv/Kconfig +0 -0
index 86957ec7b06..b72a248809e 100644

hw/riscv/Kconfig config MICROCHIP_PFSOC · line 15

Quoted 4 lines
hw/riscv/Kconfig +1 -0
@@ -12,6 +12,7 @@ config MICROCHIP_PFSOC
     select SIFIVE_CLINT
     select SIFIVE_PDMA
     select SIFIVE_PLIC
+    select SERIAL

This dependency should be expressed by MCHP_PFSOC_MMUART in hw/char/Kconfig

hw/riscv/Kconfig config MICROCHIP_PFSOC

Quoted 4 lines
hw/riscv/Kconfig +0 -1
     select UNIMP
 
 config OPENTITAN
--

Regards,
Bin

#19 lore raw

Re: [PATCH 06/10] hw/riscv/Kconfig: Add missing dependency MICROCHIP_PFSOC -> SERIAL

Quoted 22 lines · Bin Meng

Hi Philippe,

Quoted 18 lines · Philippe Mathieu-Daudé

Commit a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation") added a dependency on the SERIAL model, but forgot to add the Kconfig selector. Fix that to solve when built the MICROCHIP_PFSOC machine stand-alone:

/usr/bin/ld: libcommon.fa.p/hw_char_mchp_pfsoc_mmuart.c.o: in function `mchp_pfsoc_mmuart_create':
hw/char/mchp_pfsoc_mmuart.c:79: undefined reference to `serial_mm_init'

Fixes a8fb0a500a6 ("hw/char: Add Microchip PolarFire SoC MMUART emulation")

---
Cc: Bin Meng <[email protected]>
Cc: Alistair Francis <[email protected]>

---
 hw/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

hw/riscv/Kconfig config MICROCHIP_PFSOC · line 15

Quoted 9 lines
hw/riscv/Kconfig +1 -0
index 86957ec7b06..b72a248809e 100644
@@ -12,6 +12,7 @@ config MICROCHIP_PFSOC
     select SIFIVE_CLINT
     select SIFIVE_PDMA
     select SIFIVE_PLIC
+    select SERIAL

This dependency should be expressed by MCHP_PFSOC_MMUART in hw/char/Kconfig

Oh I missed this symbol, good catch!

#20 lore raw

PATCH 7/10 hw/riscv/Kconfig: Restrict NUMA to Virt & Spike machines

In reply to Philippe Mathieu-Daudé

Only the Virt and Spike machines use NUMA. Add a RISCV_NUMA Kconfig symbol and only have these machines select it. Adapt the Meson file to only built it if required.

---
 hw/riscv/Kconfig     | 5 +++++
 hw/riscv/meson.build | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
hw/riscv/Kconfig +5 -0
index b72a248809e..b22736169c1 100644
@@ -1,3 +1,6 @@
+config RISCV_NUMA
+    bool
+
 config IBEX
     bool
 
@@ -35,6 +38,7 @@ config RISCV_VIRT
     imply PCI_DEVICES
     imply VIRTIO_VGA
     imply TEST_DEVICES
+    select RISCV_NUMA
     select GOLDFISH_RTC
     select MSI_NONBROKEN
     select PCI
@@ -75,6 +79,7 @@ config SIFIVE_U
 
 config SPIKE
     bool
+    select RISCV_NUMA
     select HTIF
     select MSI_NONBROKEN
     select SIFIVE_CLINT
hw/riscv/meson.build +1 -1
index a97454661c0..ab6cae57eae 100644
@@ -1,6 +1,6 @@
 riscv_ss = ss.source_set()
 riscv_ss.add(files('boot.c'), fdt)
-riscv_ss.add(files('numa.c'))
+riscv_ss.add(when: 'CONFIG_RISCV_NUMA', if_true: files('numa.c'))
 riscv_ss.add(files('riscv_hart.c'))
 riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c'))
 riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c'))
Signature · 1 line
2.26.3
Reviewed-by on v1 7/10
#21 lore raw

Re: [PATCH 07/10] hw/riscv/Kconfig: Restrict NUMA to Virt & Spike machines

Quoted 11 lines · Philippe Mathieu-Daudé

Only the Virt and Spike machines use NUMA. Add a RISCV_NUMA Kconfig symbol and only have these machines select it. Adapt the Meson file to only built it if required.

---
 hw/riscv/Kconfig     | 5 +++++
 hw/riscv/meson.build | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
#22 lore raw

PATCH 8/10 hw/ppc/Kconfig: Add missing dependency E500 -> DS1338 RTC

In reply to Philippe Mathieu-Daudé

Commit 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it") added a global dependency on the DS1338 model, instead of a machine one (via Kconfig). This gives trouble when building standalone machines not exposing I2C bus:

The following clauses were found for DS1338

CONFIG_DS1338=y
config DS1338 depends on I2C

Fix by selecting the DS1338 symbol in the single machine requiring it, the E500.

Fixes 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it")

---
Cc: Amit Singh Tomar <[email protected]>
Cc: Andrew Randrianasulu <[email protected]>

---
 default-configs/devices/ppc-softmmu.mak | 1 -
 hw/ppc/Kconfig                          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
default-configs/devices/ppc-softmmu.mak +0 -1
index c2d41198cde..5a7f99d1e45 100644
@@ -1,7 +1,6 @@
 # Default configuration for ppc-softmmu
 
 # For embedded PPCs:
-CONFIG_DS1338=y
 CONFIG_E500=y
 CONFIG_PPC405=y
 CONFIG_PPC440=y
hw/ppc/Kconfig +1 -0
index 66e0b15d9ef..2e4c56eb770 100644
@@ -128,6 +128,7 @@ config E500
     select SERIAL
     select MPC_I2C
     select FDT_PPC
+    select DS1338
 
 config VIRTEX
     bool
Signature · 1 line
2.26.3
Acked-by on v1 8/10
#23 lore raw

Re: [PATCH 08/10] hw/ppc/Kconfig: Add missing dependency E500 -> DS1338 RTC

Quoted 7 lines · Philippe Mathieu-Daudé

Commit 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it") added a global dependency on the DS1338 model, instead of a machine one (via Kconfig). This gives trouble when building standalone machines not exposing I2C bus:

The following clauses were found for DS1338

Quoted 8 lines

CONFIG_DS1338=y
config DS1338 depends on I2C

Fix by selecting the DS1338 symbol in the single machine requiring it, the E500.

Fixes 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it")
Quoted 32 lines

---
Cc: Amit Singh Tomar <[email protected]>
Cc: Andrew Randrianasulu <[email protected]>

---
 default-configs/devices/ppc-softmmu.mak | 1 -
 hw/ppc/Kconfig                          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
default-configs/devices/ppc-softmmu.mak +0 -1
index c2d41198cde..5a7f99d1e45 100644
@@ -1,7 +1,6 @@
 # Default configuration for ppc-softmmu
 
 # For embedded PPCs:
-CONFIG_DS1338=y
 CONFIG_E500=y
 CONFIG_PPC405=y
 CONFIG_PPC440=y
hw/ppc/Kconfig +1 -0
index 66e0b15d9ef..2e4c56eb770 100644
@@ -128,6 +128,7 @@ config E500
     select SERIAL
     select MPC_I2C
     select FDT_PPC
+    select DS1338
 
 config VIRTEX
     bool
Signature · 4 lines
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
Reviewed-by on v1 8/10
#24 lore raw

Re: [PATCH 08/10] hw/ppc/Kconfig: Add missing dependency E500 -> DS1338 RTC

In reply to Philippe Mathieu-Daudé
Quoted 16 lines · Philippe Mathieu-Daudé

Commit 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it") added a global dependency on the DS1338 model, instead of a machine one (via Kconfig). This gives trouble when building standalone machines not exposing I2C bus:

The following clauses were found for DS1338

CONFIG_DS1338=y
config DS1338 depends on I2C

Fix by selecting the DS1338 symbol in the single machine requiring it, the E500.

Fixes 7abb479c7ab ("PPC: E500: Add FSL I2C controller and integrate RTC with it")
Quoted 8 lines

---
Cc: Amit Singh Tomar <[email protected]>
Cc: Andrew Randrianasulu <[email protected]>

---
 default-configs/devices/ppc-softmmu.mak | 1 -
 hw/ppc/Kconfig                          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
#25 lore raw

PATCH 9/10 default-configs/devices: Remove implicy SEMIHOSTING config

In reply to Philippe Mathieu-Daudé

Cmmit 56b5170c87e ("semihosting: Move ARM semihosting code to shared directories"), added the ARM_COMPATIBLE_SEMIHOSTING symbol which selects SEMIHOSTING.

Since the ARM/RISC-V targets select ARM_COMPATIBLE_SEMIHOSTING, they don't need to select SEMIHOSTING manually. Simplify.

---
 default-configs/devices/arm-softmmu.mak     | 1 -
 default-configs/devices/riscv32-softmmu.mak | 1 -
 default-configs/devices/riscv64-softmmu.mak | 1 -
 3 files changed, 3 deletions(-)
default-configs/devices/arm-softmmu.mak +0 -1
index 0500156a0c7..341d439de6f 100644
@@ -41,6 +41,5 @@ CONFIG_MICROBIT=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +0 -1
index d847bd5692e..5c9ad2590ef 100644
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
default-configs/devices/riscv64-softmmu.mak +0 -1
index bc69301fa4a..8a92f0a2c74 100644
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
Signature · 1 line
2.26.3
#26 lore raw

Re: [PATCH 09/10] default-configs/devices: Remove implicy SEMIHOSTING config

Forgot to Cc Alex.

Quoted 50 lines · Philippe Mathieu-Daudé

Cmmit 56b5170c87e ("semihosting: Move ARM semihosting code to shared directories"), added the ARM_COMPATIBLE_SEMIHOSTING symbol which selects SEMIHOSTING.

Since the ARM/RISC-V targets select ARM_COMPATIBLE_SEMIHOSTING, they don't need to select SEMIHOSTING manually. Simplify.

---
 default-configs/devices/arm-softmmu.mak     | 1 -
 default-configs/devices/riscv32-softmmu.mak | 1 -
 default-configs/devices/riscv64-softmmu.mak | 1 -
 3 files changed, 3 deletions(-)
default-configs/devices/arm-softmmu.mak +0 -1
index 0500156a0c7..341d439de6f 100644
@@ -41,6 +41,5 @@ CONFIG_MICROBIT=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +0 -1
index d847bd5692e..5c9ad2590ef 100644
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
default-configs/devices/riscv64-softmmu.mak +0 -1
index bc69301fa4a..8a92f0a2c74 100644
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_SEMIHOSTING=y
 CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
Reviewed-by on v1 9/10
#27 lore raw

Re: [PATCH 09/10] default-configs/devices: Remove implicy SEMIHOSTING config

In reply to Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

Cmmit 56b5170c87e ("semihosting: Move ARM semihosting code to shared directories"), added the ARM_COMPATIBLE_SEMIHOSTING symbol which selects SEMIHOSTING.

Since the ARM/RISC-V targets select ARM_COMPATIBLE_SEMIHOSTING, they don't need to select SEMIHOSTING manually. Simplify.

Quoted 7 lines
---
 default-configs/devices/arm-softmmu.mak     | 1 -
 default-configs/devices/riscv32-softmmu.mak | 1 -
 default-configs/devices/riscv64-softmmu.mak | 1 -
 3 files changed, 3 deletions(-)
#28 lore raw

Re: [PATCH 09/10] default-configs/devices: Remove implicy SEMIHOSTING config

Quoted 5 lines · Bin Meng
Quoted 2 lines · Philippe Mathieu-Daudé

Cmmit 56b5170c87e ("semihosting: Move ARM semihosting code to

typo: Commit

Quoted 15 lines
Quoted 6 lines

shared directories"), added the ARM_COMPATIBLE_SEMIHOSTING symbol which selects SEMIHOSTING.

Since the ARM/RISC-V targets select ARM_COMPATIBLE_SEMIHOSTING, they don't need to select SEMIHOSTING manually. Simplify.

Quoted 7 lines
---
 default-configs/devices/arm-softmmu.mak     | 1 -
 default-configs/devices/riscv32-softmmu.mak | 1 -
 default-configs/devices/riscv64-softmmu.mak | 1 -
 3 files changed, 3 deletions(-)
#29 lore raw

PATCH 10/10 default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is required

In reply to Philippe Mathieu-Daudé

ARM_COMPATIBLE_SEMIHOSTING is not optional on these targets. Move the variable assignment out of the block documented with "Uncomment the following lines to disable these optional devices".

---
 default-configs/devices/arm-softmmu.mak     | 4 +++-
 default-configs/devices/riscv32-softmmu.mak | 4 +++-
 default-configs/devices/riscv64-softmmu.mak | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)
default-configs/devices/arm-softmmu.mak +3 -1
index 341d439de6f..2713e5e9eb7 100644
@@ -1,5 +1,8 @@
 # Default configuration for arm-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # TODO: ARM_V7M is currently always required - make this more flexible!
 CONFIG_ARM_V7M=y
 
@@ -41,5 +44,4 @@ CONFIG_MICROBIT=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +3 -1
index 5c9ad2590ef..7219f9749ad 100644
@@ -1,9 +1,11 @@
 # Default configuration for riscv32-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
default-configs/devices/riscv64-softmmu.mak +3 -1
index 8a92f0a2c74..1d1b8bb9f68 100644
@@ -1,9 +1,11 @@
 # Default configuration for riscv64-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
Signature · 1 line
2.26.3
#30 lore raw

Re: [PATCH 10/10] default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is required

Cc Alex & Thomas

Quoted 65 lines · Philippe Mathieu-Daudé

ARM_COMPATIBLE_SEMIHOSTING is not optional on these targets. Move the variable assignment out of the block documented with "Uncomment the following lines to disable these optional devices".

---
 default-configs/devices/arm-softmmu.mak     | 4 +++-
 default-configs/devices/riscv32-softmmu.mak | 4 +++-
 default-configs/devices/riscv64-softmmu.mak | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)
default-configs/devices/arm-softmmu.mak +3 -1
index 341d439de6f..2713e5e9eb7 100644
@@ -1,5 +1,8 @@
 # Default configuration for arm-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # TODO: ARM_V7M is currently always required - make this more flexible!
 CONFIG_ARM_V7M=y
 
@@ -41,5 +44,4 @@ CONFIG_MICROBIT=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +3 -1
index 5c9ad2590ef..7219f9749ad 100644
@@ -1,9 +1,11 @@
 # Default configuration for riscv32-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
default-configs/devices/riscv64-softmmu.mak +3 -1
index 8a92f0a2c74..1d1b8bb9f68 100644
@@ -1,9 +1,11 @@
 # Default configuration for riscv64-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
#31 lore raw

Re: [PATCH 10/10] default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is required

In reply to Philippe Mathieu-Daudé
Quoted 3 lines · Philippe Mathieu-Daudé

ARM_COMPATIBLE_SEMIHOSTING is not optional on these targets. Move the variable assignment out of the block documented with "Uncomment the following lines to disable these optional devices".

Can you document why it is always required in the commit message?

I suppose you cannot move it to default-configs/targets/ because you want to have CONFIG_SEMIHOSTING selected automatically (patch 9).

Paolo

Quoted 61 lines
---
  default-configs/devices/arm-softmmu.mak     | 4 +++-
  default-configs/devices/riscv32-softmmu.mak | 4 +++-
  default-configs/devices/riscv64-softmmu.mak | 4 +++-
  3 files changed, 9 insertions(+), 3 deletions(-)
default-configs/devices/arm-softmmu.mak +3 -1
index 341d439de6f..2713e5e9eb7 100644
@@ -1,5 +1,8 @@
  # Default configuration for arm-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
  # TODO: ARM_V7M is currently always required - make this more flexible!
  CONFIG_ARM_V7M=y
 
@@ -41,5 +44,4 @@ CONFIG_MICROBIT=y
  CONFIG_FSL_IMX25=y
  CONFIG_FSL_IMX7=y
  CONFIG_FSL_IMX6UL=y
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
  CONFIG_ALLWINNER_H3=y
default-configs/devices/riscv32-softmmu.mak +3 -1
index 5c9ad2590ef..7219f9749ad 100644
@@ -1,9 +1,11 @@
  # Default configuration for riscv32-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
  # Uncomment the following lines to disable these optional devices:
  #
  #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
  # Boards:
  #
default-configs/devices/riscv64-softmmu.mak +3 -1
index 8a92f0a2c74..1d1b8bb9f68 100644
@@ -1,9 +1,11 @@
  # Default configuration for riscv64-softmmu
 
+# TODO: semihosting is always required - move to default-configs/targets/
+CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
+
  # Uncomment the following lines to disable these optional devices:
  #
  #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
  # Boards:
  #
#32 lore raw

Re: [PATCH 10/10] default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is required

Quoted 6 lines · Paolo Bonzini
Quoted 3 lines · Philippe Mathieu-Daudé

ARM_COMPATIBLE_SEMIHOSTING is not optional on these targets. Move the variable assignment out of the block documented with "Uncomment the following lines to disable these optional devices".

Can you document why it is always required in the commit message?

OK, basically SEMIHOSTING is not a device but an architectural thing. Maybe we are mixing various things, like a semihosting console (yes, a device) and the architectural part, I will discuss that with Alex.

Quoted 2 lines

I suppose you cannot move it to default-configs/targets/ because you want to have CONFIG_SEMIHOSTING selected automatically (patch 9).

That and other things. This is annoying me since more than 1 year. I'm waiting Claudio's ARM KVM/TCG series get merged before getting my hands dirty with meson.build. Let's postpone this patch (and the previous one) for now.

Thanks for the review,

Phil.

Acked-by on the v1 series
#33 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 35 lines · Philippe Mathieu-Daudé

Various Kconfig fixes when building stand-alone machine binaries.

FYI I'm looking at a way to test this automatically, by generating all the configurations using:
https://docs.gitlab.com/ee/ci/parent_child_pipelines.html#dynamic-child-pipel=
ines
This way we could run this on release candidate tags.

Philippe Mathieu-Daud=C3=A9 (10):
hw/mem/nvdimm: Use Kconfig 'imply' instead of 'depends on' hw/ide/Kconfig: Add missing dependency PCI -> QDEV hw/arm/Kconfig: Add missing dependency NPCM7XX -> SMBUS hw/arm/Kconfig: Remove unused DS1338 symbol from i.MX25 PDK Board hw/arm/Kconfig: Add missing SDHCI symbol to FSL_IMX25 hw/riscv/Kconfig: Add missing dependency MICROCHIP_PFSOC -> SERIAL hw/riscv/Kconfig: Restrict NUMA to Virt & Spike machines hw/ppc/Kconfig: Add missing dependency E500 -> DS1338 RTC default-configs/devices: Remove implicy SEMIHOSTING config default-configs/devices: Clarify ARM_COMPATIBLE_SEMIHOSTING is
required

  default-configs/devices/arm-softmmu.mak     | 5 +++--
  default-configs/devices/ppc-softmmu.mak     | 1 -
  default-configs/devices/ppc64-softmmu.mak   | 1 -
  default-configs/devices/riscv32-softmmu.mak | 5 +++--
  default-configs/devices/riscv64-softmmu.mak | 5 +++--
  hw/arm/Kconfig                              | 4 +++-
  hw/i386/Kconfig                             | 1 +
  hw/ide/Kconfig                              | 2 +-
  hw/mem/Kconfig                              | 2 --
  hw/ppc/Kconfig                              | 2 ++
  hw/riscv/Kconfig                            | 6 ++++++
  hw/riscv/meson.build                        | 2 +-
  12 files changed, 23 insertions(+), 13 deletions(-)
Quoted 5 lines

--=20
2.26.3

For patches 1-8

Feel free to send a pull request once the target maintainers for ARM/RISC-V/PPC have had a look.

Paolo