Skip to contentSkip to conversation

configs: switch boards to "default y"

PATCH In review Paolo Bonzini 4 participants 46 messages Apr 23, 2024 – May 3, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover configs: switch boards to "default y"

Some boards, notably ARM boards that use TCG, are already using "default y". This was done to remove TCG-only boards from a KVM-only build in commit 29d9efca16 (2023-04-26).

This series converts all other boards to that, so that the requirements of each board are clearer in the Kconfig files.

For now, the only such use is MIPS's 64-bit and endianness requirements. In the future, it will be possible to enable/disable boards based on the presence of required libraries, for example libfdt, or their deprecation status.

There is an important difference in that Kconfig symbols for boards have to be enabled in a --without-default-devices build, similar to devices.

Paolo

Paolo Bonzini (22):
configs: list "implied" device groups in the default configs
alpha: switch boards to "default y"
arm: switch boards to "default y"
avr: switch boards to "default y"
cris: switch boards to "default y"
hppa: switch boards to "default y"
i386: switch boards to "default y"
loongarch: switch boards to "default y"
m68k: switch boards to "default y"
microblaze: switch boards to "default y"
meson: make target endianneess available to Kconfig
mips: switch boards to "default y"
nios2: switch boards to "default y"
openrisc: switch boards to "default y"
ppc: switch boards to "default y"
riscv: switch boards to "default y"
rx: switch boards to "default y"
s390x: switch boards to "default y"
sh4: switch boards to "default y"
sparc: switch boards to "default y"
tricore: switch boards to "default y"
xtensa: switch boards to "default y"

 configs/devices/alpha-softmmu/default.mak     |  5 ++--
 configs/devices/arm-softmmu/default.mak       |  5 +++-
 configs/devices/avr-softmmu/default.mak       |  5 ++--
 configs/devices/cris-softmmu/default.mak      |  5 ++--
 configs/devices/hppa-softmmu/default.mak      |  5 ++--
 configs/devices/i386-softmmu/default.mak      | 11 ++++---
 .../devices/loongarch64-softmmu/default.mak   |  6 +++-
 configs/devices/m68k-softmmu/default.mak      | 13 ++++----
 .../devices/microblaze-softmmu/default.mak    |  9 +++---
 configs/devices/mips-softmmu/common.mak       |  5 ++--
 configs/devices/mips64-softmmu/default.mak    |  4 ++-
 configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
 configs/devices/nios2-softmmu/default.mak     |  7 ++---
 configs/devices/or1k-softmmu/default.mak      |  9 ++++--
 configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
 configs/devices/ppc64-softmmu/default.mak     |  8 ++---
 configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
 configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
 configs/devices/rx-softmmu/default.mak        |  3 +-
 configs/devices/s390x-softmmu/default.mak     |  5 ++--
 configs/devices/sh4-softmmu/default.mak       |  7 ++---
 configs/devices/sparc-softmmu/default.mak     |  7 ++---
 configs/devices/sparc64-softmmu/default.mak   |  7 ++---
 configs/devices/tricore-softmmu/default.mak   |  7 +++--
 configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
 meson.build                                   | 12 ++++----
 hw/alpha/Kconfig                              |  2 ++
 hw/arm/Kconfig                                |  2 ++
 hw/avr/Kconfig                                |  3 ++
 hw/cris/Kconfig                               |  2 ++
 hw/hppa/Kconfig                               |  2 ++
 hw/i386/Kconfig                               | 10 ++++++-
 hw/loongarch/Kconfig                          |  2 ++
 hw/m68k/Kconfig                               | 10 +++++++
 hw/microblaze/Kconfig                         |  6 ++++
 hw/mips/Kconfig                               | 12 ++++++++
 hw/nios2/Kconfig                              |  9 +++---
 hw/openrisc/Kconfig                           |  4 +++
 hw/ppc/Kconfig                                | 26 ++++++++++++++++
 hw/riscv/Kconfig                              | 14 +++++++++
 hw/rx/Kconfig                                 |  2 ++
 hw/s390x/Kconfig                              |  2 ++
 hw/sh4/Kconfig                                |  4 +++
 hw/sparc/Kconfig                              |  4 +++
 hw/sparc64/Kconfig                            |  4 +++
 hw/tricore/Kconfig                            |  4 +++
 hw/xtensa/Kconfig                             |  6 ++++
 target/Kconfig                                |  3 ++
 target/i386/Kconfig                           |  1 +
 target/ppc/Kconfig                            |  1 +
 50 files changed, 252 insertions(+), 115 deletions(-)
Signature · 1 line
2.44.0
#2 lore raw

PATCH 2/22 alpha: switch boards to "default y"

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Start with Alpha.

No changes to generated config-devices.mak file.

---
 configs/devices/alpha-softmmu/default.mak | 5 ++---
 hw/alpha/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)
configs/devices/alpha-softmmu/default.mak +2 -3
index d186fe8e9b1..3de6a9f5779 100644
@@ -5,6 +5,5 @@
 #CONFIG_PCI_DEVICES=n
 #CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_DP264=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_DP264=n
hw/alpha/Kconfig +2 -0
index 9af650c94ec..7f3455ce1e1 100644
@@ -1,5 +1,7 @@
 config DP264
     bool
+    default y
+    depends on ALPHA
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply E1000_PCI
Signature · 1 line
2.44.0
#19 lore raw

PATCH 9/22 m68k: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with m68k.

No changes to generated config-devices.mak file.

---
 configs/devices/m68k-softmmu/default.mak | 13 ++++++-------
 hw/m68k/Kconfig                          | 10 ++++++++++
 2 files changed, 16 insertions(+), 7 deletions(-)
configs/devices/m68k-softmmu/default.mak +6 -7
index 8dcaa28ed38..3ceda6b041b 100644
@@ -1,9 +1,8 @@
 # Default configuration for m68k-softmmu
 
-# Boards:
-#
-CONFIG_AN5206=y
-CONFIG_MCF5208=y
-CONFIG_NEXTCUBE=y
-CONFIG_Q800=y
-CONFIG_M68K_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_AN5206=n
+# CONFIG_MCF5208=n
+# CONFIG_NEXTCUBE=n
+# CONFIG_Q800=n
+# CONFIG_M68K_VIRT=n
hw/m68k/Kconfig +10 -0
index d88741ec9d1..0092cda4e9c 100644
@@ -1,20 +1,28 @@
 config AN5206
     bool
+    default y
+    depends on M68K
     select COLDFIRE
     select PTIMER
 
 config MCF5208
     bool
+    default y
+    depends on M68K
     select COLDFIRE
     select PTIMER
 
 config NEXTCUBE
     bool
+    default y
+    depends on M68K
     select FRAMEBUFFER
     select ESCC
 
 config Q800
     bool
+    default y
+    depends on M68K
     select MAC_VIA
     select NUBUS
     select MACFB
@@ -29,6 +37,8 @@ config Q800
 
 config M68K_VIRT
     bool
+    default y
+    depends on M68K
     select M68K_IRQC
     select VIRT_CTRL
     select GOLDFISH_PIC
Signature · 1 line
2.44.0
#30 lore raw

PATCH 15/22 ppc: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with PowerPC/POWER.

No changes to generated config-devices.mak files, other than adding CONFIG_PPC to the ppc64-softmmu target.

---
 configs/devices/ppc-softmmu/default.mak   | 26 ++++++++++++-----------
 configs/devices/ppc64-softmmu/default.mak |  8 +++----
 hw/ppc/Kconfig                            | 26 +++++++++++++++++++++++
 target/ppc/Kconfig                        |  1 +
 4 files changed, 44 insertions(+), 17 deletions(-)
configs/devices/ppc-softmmu/default.mak +14 -12
index 3061b26749a..460d15e676b 100644
@@ -4,22 +4,24 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-# For embedded PPCs:
-CONFIG_E500PLAT=y
-CONFIG_MPC8544DS=y
-CONFIG_PPC405=y
-CONFIG_PPC440=y
-CONFIG_VIRTEX=y
+# Boards are selected by default, uncomment to keep out of the build.
+
+# Embedded PPCs:
+# CONFIG_E500PLAT=n
+# CONFIG_MPC8544DS=n
+# CONFIG_PPC405=n
+# CONFIG_PPC440=n
+# CONFIG_VIRTEX=n
 
 # For Sam460ex
-CONFIG_SAM460EX=y
+# CONFIG_SAM460EX=n
 
 # For Macs
-CONFIG_MAC_OLDWORLD=y
-CONFIG_MAC_NEWWORLD=y
+# CONFIG_MAC_OLDWORLD=n
+# CONFIG_MAC_NEWWORLD=n
 
-CONFIG_AMIGAONE=y
-CONFIG_PEGASOS2=y
+# CONFIG_AMIGAONE=n
+# CONFIG_PEGASOS2=n
 
 # For PReP
-CONFIG_PREP=y
+# CONFIG_PREP=n
configs/devices/ppc64-softmmu/default.mak +3 -5
index b90e5bf4558..e8ad2603133 100644
@@ -3,8 +3,6 @@
 # Include all 32-bit boards
 include ../ppc-softmmu/default.mak
 
-# For PowerNV
-CONFIG_POWERNV=y
-
-# For pSeries
-CONFIG_PSERIES=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_POWERNV=n
+# CONFIG_PSERIES=n
hw/ppc/Kconfig +26 -0
index 37ccf9cdcaf..78f83e78ce5 100644
@@ -1,5 +1,7 @@
 config PSERIES
     bool
+    default y
+    depends on PPC64
     imply USB_OHCI_PCI
     imply PCI_DEVICES
     imply TEST_DEVICES
@@ -23,6 +25,8 @@ config SPAPR_RNG
 
 config POWERNV
     bool
+    default y
+    depends on PPC64
     imply PCI_DEVICES
     imply TEST_DEVICES
     select ISA_IPMI_BT
@@ -38,6 +42,8 @@ config POWERNV
 
 config PPC405
     bool
+    default y
+    depends on PPC
     select M48T59
     select PFLASH_CFI02
     select PPC4XX
@@ -45,6 +51,8 @@ config PPC405
 
 config PPC440
     bool
+    default y
+    depends on PPC
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply E1000_PCI
@@ -62,6 +70,8 @@ config PPC4XX
 
 config SAM460EX
     bool
+    default y
+    depends on PPC
     select PFLASH_CFI01
     select IDE_SII3112
     select M41T80
@@ -75,6 +85,8 @@ config SAM460EX
 
 config AMIGAONE
     bool
+    default y
+    depends on PPC
     imply ATI_VGA
     select ARTICIA
     select VT82C686
@@ -82,6 +94,8 @@ config AMIGAONE
 
 config PEGASOS2
     bool
+    default y
+    depends on PPC
     imply ATI_VGA
     select MV64361
     select VT82C686
@@ -90,6 +104,8 @@ config PEGASOS2
 
 config PREP
     bool
+    default y
+    depends on PPC
     imply PCI_DEVICES
     imply TEST_DEVICES
     select CS4231A
@@ -106,6 +122,8 @@ config RS6000_MC
 
 config MAC_OLDWORLD
     bool
+    default y
+    depends on PPC
     imply PCI_DEVICES
     imply SUNGEM
     imply TEST_DEVICES
@@ -117,6 +135,8 @@ config MAC_OLDWORLD
 
 config MAC_NEWWORLD
     bool
+    default y
+    depends on PPC
     imply PCI_DEVICES
     imply SUNGEM
     imply TEST_DEVICES
@@ -147,14 +167,20 @@ config E500
 
 config E500PLAT
     bool
+    default y
+    depends on PPC
     select E500
 
 config MPC8544DS
     bool
+    default y
+    depends on PPC
     select E500
 
 config VIRTEX
     bool
+    default y
+    depends on PPC
     select PPC4XX
     select PFLASH_CFI01
     select SERIAL
target/ppc/Kconfig +1 -0
index 3ff152051a3..0283711673e 100644
@@ -3,3 +3,4 @@ config PPC
 
 config PPC64
     bool
+    select PPC
Signature · 1 line
2.44.0
#16 lore raw

PATCH 7/22 i386: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with i386.

No changes to generated config-devices.mak files, other than adding CONFIG_I386 to the x86_64-softmmu target.

---
 configs/devices/i386-softmmu/default.mak | 11 +++++------
 hw/i386/Kconfig                          | 10 +++++++++-
 target/i386/Kconfig                      |  1 +
 3 files changed, 15 insertions(+), 7 deletions(-)
configs/devices/i386-softmmu/default.mak +5 -6
index 598c6646dfc..448e3e3b1ba 100644
@@ -24,9 +24,8 @@
 #CONFIG_VTD=n
 #CONFIG_SGX=n
 
-# Boards:
-#
-CONFIG_ISAPC=y
-CONFIG_I440FX=y
-CONFIG_Q35=y
-CONFIG_MICROVM=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ISAPC=n
+# CONFIG_I440FX=n
+# CONFIG_Q35=n
+# CONFIG_MICROVM=n
hw/i386/Kconfig +9 -1
index a6ee052f9a1..4362164962c 100644
@@ -66,6 +66,8 @@ config PC_ACPI
 
 config I440FX
     bool
+    default y
+    depends on I386
     imply E1000_PCI
     imply VMPORT
     imply VMMOUSE
@@ -81,6 +83,8 @@ config I440FX
 
 config ISAPC
     bool
+    default y
+    depends on I386
     imply VGA_ISA
     select ISA_BUS
     select PC
@@ -91,6 +95,8 @@ config ISAPC
 
 config Q35
     bool
+    default y
+    depends on I386
     imply VTD
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
@@ -108,6 +114,8 @@ config Q35
 
 config MICROVM
     bool
+    default y
+    depends on I386
     select SERIAL_ISA # for serial_hds_isa_init()
     select ISA_BUS
     select APIC
@@ -142,4 +150,4 @@ config VMMOUSE
 config XEN_EMU
     bool
     default y
-    depends on KVM && (I386 || X86_64)
+    depends on KVM && I386
target/i386/Kconfig +1 -0
index ce6968906ee..3e62fdc7064 100644
@@ -3,3 +3,4 @@ config I386
 
 config X86_64
     bool
+    select I386
Signature · 1 line
2.44.0
#25 lore raw

PATCH 12/22 mips: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with MIPS.

No changes to generated config-devices.mak file.

---
 configs/devices/mips-softmmu/common.mak      |  5 +++--
 configs/devices/mips64-softmmu/default.mak   |  4 +++-
 configs/devices/mips64el-softmmu/default.mak | 10 ++++++----
 hw/mips/Kconfig                              | 12 ++++++++++++
 4 files changed, 24 insertions(+), 7 deletions(-)
configs/devices/mips-softmmu/common.mak +3 -2
index 416a5d353e8..b50107feafe 100644
@@ -4,5 +4,6 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-CONFIG_MALTA=y
-CONFIG_MIPSSIM=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_MALTA=n
+# CONFIG_MIPSSIM=n
configs/devices/mips64-softmmu/default.mak +3 -1
index 566672f3c22..1b8d7ced1c6 100644
@@ -1,4 +1,6 @@
 # Default configuration for mips64-softmmu
 
 include ../mips-softmmu/common.mak
-CONFIG_JAZZ=y
+
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_JAZZ=n
configs/devices/mips64el-softmmu/default.mak +6 -4
index 88a37cf27f1..9dce346c4fb 100644
@@ -1,7 +1,9 @@
 # Default configuration for mips64el-softmmu
 
 include ../mips-softmmu/common.mak
-CONFIG_FULOONG=y
-CONFIG_LOONGSON3V=y
-CONFIG_JAZZ=y
-CONFIG_MIPS_BOSTON=y
+
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_FULOONG=n
+# CONFIG_LOONGSON3V=n
+# CONFIG_JAZZ=n
+# CONFIG_MIPS_BOSTON=n
hw/mips/Kconfig +12 -0
index 5c83ef49cf6..9bccb363eb9 100644
@@ -1,5 +1,7 @@
 config MALTA
     bool
+    default y
+    depends on MIPS
     imply PCNET_PCI
     imply PCI_DEVICES
     imply TEST_DEVICES
@@ -13,11 +15,15 @@ config MALTA
 
 config MIPSSIM
     bool
+    default y
+    depends on MIPS
     select SERIAL
     select MIPSNET
 
 config JAZZ
     bool
+    default y
+    depends on MIPS64
     select ISA_BUS
     select RC4030
     select I8259
@@ -38,6 +44,8 @@ config JAZZ
 
 config FULOONG
     bool
+    default y
+    depends on MIPS64 && !TARGET_BIG_ENDIAN
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply ATI_VGA
@@ -48,6 +56,8 @@ config FULOONG
 
 config LOONGSON3V
     bool
+    default y
+    depends on MIPS64 && !TARGET_BIG_ENDIAN
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VIRTIO_PCI
@@ -69,6 +79,8 @@ config MIPS_CPS
 
 config MIPS_BOSTON
     bool
+    default y
+    depends on MIPS64 && !TARGET_BIG_ENDIAN
     imply PCI_DEVICES
     imply TEST_DEVICES
     select FITLOADER
Signature · 1 line
2.44.0
#33 lore raw

PATCH 17/22 rx: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RX.

No changes to generated config-devices.mak file.

---
 configs/devices/rx-softmmu/default.mak | 3 ++-
 hw/rx/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/rx-softmmu/default.mak +2 -1
index df2b4e4f426..e7caebe1974 100644
@@ -1,3 +1,4 @@
 # Default configuration for rx-softmmu
 
-CONFIG_RX_GDBSIM=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_RX_GDBSIM=n
hw/rx/Kconfig +2 -0
index 2b297c5a6a6..b2fa2b7eec3 100644
@@ -7,4 +7,6 @@ config RX62N_MCU
 
 config RX_GDBSIM
     bool
+    default y
+    depends on RX
     select RX62N_MCU
Signature · 1 line
2.44.0
#4 lore raw

PATCH 3/22 arm: switch boards to "default y"

In reply to Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

---
 configs/devices/arm-softmmu/default.mak | 3 ++-
 hw/arm/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/arm-softmmu/default.mak +2 -1
index c1cfb3bcf75..31f77c20269 100644
@@ -5,7 +5,8 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
 # These are selected by default when TCG is enabled, uncomment them to
 # keep out of the build.
hw/arm/Kconfig +2 -0
index 893a7bff66b..1e7cd01087f 100644
@@ -1,5 +1,7 @@
 config ARM_VIRT
     bool
+    default y
+    depends on ARM
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply VFIO_AMD_XGBE
Signature · 1 line
2.44.0
#36 lore raw

PATCH 19/22 sh4: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with SH.

No changes to generated config-devices.mak file.

---
 configs/devices/sh4-softmmu/default.mak | 7 +++----
 hw/sh4/Kconfig                          | 4 ++++
 2 files changed, 7 insertions(+), 4 deletions(-)
configs/devices/sh4-softmmu/default.mak +3 -4
index 565e8b0b5df..c06a427053a 100644
@@ -5,7 +5,6 @@
 #CONFIG_PCI_DEVICES=n
 #CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_R2D=y
-CONFIG_SHIX=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_R2D=n
+# CONFIG_SHIX=n
hw/sh4/Kconfig +4 -0
index e0c4ecd1a53..99a76a94c3f 100644
@@ -1,5 +1,7 @@
 config R2D
     bool
+    default y
+    depends on SH4
     imply PCI_DEVICES
     imply TEST_DEVICES
     imply RTL8139_PCI
@@ -13,6 +15,8 @@ config R2D
 
 config SHIX
     bool
+    default y
+    depends on SH4
     select SH7750
     select TC58128
 
Signature · 1 line
2.44.0
#1 lore raw

PATCH 1/22 configs: list "implied" device groups in the default configs

In reply to Paolo Bonzini

Match the optional device groups to what is actually included in the config-devices.mak files.

---
 configs/devices/arm-softmmu/default.mak         | 2 ++
 configs/devices/loongarch64-softmmu/default.mak | 3 +++
 configs/devices/or1k-softmmu/default.mak        | 4 ++++
 configs/devices/ppc-softmmu/default.mak         | 4 ++++
 configs/devices/riscv32-softmmu/default.mak     | 4 ++--
 configs/devices/riscv64-softmmu/default.mak     | 4 ++--
 configs/devices/xtensa-softmmu/default.mak      | 4 ++++
 7 files changed, 21 insertions(+), 4 deletions(-)
configs/devices/arm-softmmu/default.mak +2 -0
index 6ee31bc1ab9..c1cfb3bcf75 100644
@@ -1,5 +1,7 @@
 # Default configuration for arm-softmmu
 
+# Uncomment the following lines to disable these optional devices:
+# CONFIG_I2C_DEVICES=n
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
configs/devices/loongarch64-softmmu/default.mak +3 -0
index 928bc117ef7..0893112b81d 100644
@@ -1,3 +1,6 @@
 # Default configuration for loongarch64-softmmu
 
+# Uncomment the following lines to disable these optional devices:
+# CONFIG_PCI_DEVICES=n
+
 CONFIG_LOONGARCH_VIRT=y
configs/devices/or1k-softmmu/default.mak +4 -0
index 89c39e31237..3aecdf9d738 100644
@@ -1,5 +1,9 @@
 # Default configuration for or1k-softmmu
 
+# Uncomment the following lines to disable these optional devices:
+# CONFIG_PCI_DEVICES=n
+# CONFIG_TEST_DEVICES=n
+
 # Boards:
 #
 CONFIG_OR1K_SIM=y
configs/devices/ppc-softmmu/default.mak +4 -0
index b85fd2bcd71..3061b26749a 100644
@@ -1,5 +1,9 @@
 # Default configuration for ppc-softmmu
 
+# Uncomment the following lines to disable these optional devices:
+# CONFIG_PCI_DEVICES=n
+# CONFIG_TEST_DEVICES=n
+
 # For embedded PPCs:
 CONFIG_E500PLAT=y
 CONFIG_MPC8544DS=y
configs/devices/riscv32-softmmu/default.mak +2 -2
index 94a236c9c25..07e4fd26df3 100644
@@ -1,8 +1,8 @@
 # Default configuration for riscv32-softmmu
 
 # Uncomment the following lines to disable these optional devices:
-#
-#CONFIG_PCI_DEVICES=n
+# CONFIG_PCI_DEVICES=n
+# CONFIG_TEST_DEVICES=n
 
 # Boards:
 #
configs/devices/riscv64-softmmu/default.mak +2 -2
index 3f680594484..221963d4c5c 100644
@@ -1,8 +1,8 @@
 # Default configuration for riscv64-softmmu
 
 # Uncomment the following lines to disable these optional devices:
-#
-#CONFIG_PCI_DEVICES=n
+# CONFIG_PCI_DEVICES=n
+# CONFIG_TEST_DEVICES=n
 
 # Boards:
 #
configs/devices/xtensa-softmmu/default.mak +4 -0
index 49e4c9da88c..f650cad7609 100644
@@ -1,5 +1,9 @@
 # Default configuration for Xtensa
 
+# Uncomment the following lines to disable these optional devices:
+#
+#CONFIG_PCI_DEVICES=n
+
 # Boards:
 #
 CONFIG_XTENSA_SIM=y
Signature · 1 line
2.44.0
#21 lore raw

PATCH 10/22 microblaze: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Microblaze.

No changes to generated config-devices.mak file.

---
 configs/devices/microblaze-softmmu/default.mak | 9 ++++-----
 hw/microblaze/Kconfig                          | 6 ++++++
 2 files changed, 10 insertions(+), 5 deletions(-)
configs/devices/microblaze-softmmu/default.mak +4 -5
index db8c6e4bba3..583e3959bb7 100644
@@ -1,7 +1,6 @@
 # Default configuration for microblaze-softmmu
 
-# Boards:
-#
-CONFIG_PETALOGIX_S3ADSP1800=y
-CONFIG_PETALOGIX_ML605=y
-CONFIG_XLNX_ZYNQMP_PMU=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_PETALOGIX_S3ADSP1800=n
+# CONFIG_PETALOGIX_ML605=n
+# CONFIG_XLNX_ZYNQMP_PMU=n
hw/microblaze/Kconfig +6 -0
index e2697ced9cc..d78ba843fac 100644
@@ -1,5 +1,7 @@
 config PETALOGIX_S3ADSP1800
     bool
+    default y
+    depends on MICROBLAZE
     select PFLASH_CFI01
     select XILINX
     select XILINX_AXI
@@ -8,6 +10,8 @@ config PETALOGIX_S3ADSP1800
 
 config PETALOGIX_ML605
     bool
+    default y
+    depends on MICROBLAZE
     select PFLASH_CFI01
     select SERIAL
     select SSI_M25P80
@@ -18,4 +22,6 @@ config PETALOGIX_ML605
 
 config XLNX_ZYNQMP_PMU
     bool
+    default y
+    depends on MICROBLAZE
     select XLNX_ZYNQMP
Signature · 1 line
2.44.0
#39 lore raw

PATCH 21/22 tricore: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with TriCore.

No changes to generated config-devices.mak file.

---
 configs/devices/tricore-softmmu/default.mak | 7 +++++--
 hw/tricore/Kconfig                          | 4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)
configs/devices/tricore-softmmu/default.mak +5 -2
index cb8fc286eb2..c7ab542244b 100644
@@ -1,2 +1,5 @@
-CONFIG_TRICORE_TESTBOARD=y
-CONFIG_TRIBOARD=y
+# Default configuration for tricore-softmmu
+
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_TRICORE_TESTBOARD=n
+# CONFIG_TRIBOARD=n
hw/tricore/Kconfig +4 -0
index 33c1e852c33..6c04f64949d 100644
@@ -1,8 +1,12 @@
 config TRICORE_TESTBOARD
+    default y
+    depends on TRICORE
     bool
 
 config TRIBOARD
     bool
+    default y
+    depends on TRICORE
     select TC27X_SOC
 
 config TC27X_SOC
Signature · 1 line
2.44.0
#38 lore raw

PATCH 20/22 sparc: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with SPARC and SPARC64.

No changes to generated config-devices.mak file.

---
 configs/devices/sparc-softmmu/default.mak   | 7 +++----
 configs/devices/sparc64-softmmu/default.mak | 7 +++----
 hw/sparc/Kconfig                            | 4 ++++
 hw/sparc64/Kconfig                          | 4 ++++
 4 files changed, 14 insertions(+), 8 deletions(-)
configs/devices/sparc-softmmu/default.mak +3 -4
index ee852181151..87668fda5ea 100644
@@ -5,7 +5,6 @@
 #CONFIG_TCX=n
 #CONFIG_CG3=n
 
-# Boards:
-#
-CONFIG_SUN4M=y
-CONFIG_LEON3=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SUN4M=n
+# CONFIG_LEON3=n
configs/devices/sparc64-softmmu/default.mak +3 -4
index e50030a229c..fa82f39a200 100644
@@ -6,7 +6,6 @@
 #CONFIG_SUNHME=n
 #CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_SUN4U=y
-CONFIG_NIAGARA=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SUN4U=n
+# CONFIG_NIAGARA=n
hw/sparc/Kconfig +4 -0
index 79d58beb7a6..3cc165dbfb7 100644
@@ -1,5 +1,7 @@
 config SUN4M
     bool
+    default y
+    depends on SPARC && !SPARC64
     imply TCX
     imply CG3
     select CS4231
@@ -18,6 +20,8 @@ config SUN4M
 
 config LEON3
     bool
+    default y
+    depends on SPARC && !SPARC64
     select GRLIB
 
 config GRLIB
hw/sparc64/Kconfig +4 -0
index 7e557ad17b0..3b948a22907 100644
@@ -1,5 +1,7 @@
 config SUN4U
     bool
+    default y
+    depends on SPARC64
     imply PCI_DEVICES
     imply SUNHME
     imply TEST_DEVICES
@@ -16,6 +18,8 @@ config SUN4U
 
 config NIAGARA
     bool
+    default y
+    depends on SPARC64
     select EMPTY_SLOT
     select SUN4V_RTC
     select UNIMP
Signature · 1 line
2.44.0
#14 lore raw

PATCH 6/22 hppa: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with PARISC.

No changes to generated config-devices.mak file.

---
 configs/devices/hppa-softmmu/default.mak | 5 ++---
 hw/hppa/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)
configs/devices/hppa-softmmu/default.mak +2 -3
index b0364bb88f2..059510cdbb7 100644
@@ -4,6 +4,5 @@
 #
 #CONFIG_PCI_DEVICES=n
 
-# Boards:
-#
-CONFIG_HPPA_B160L=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_HPPA_B160L=n
hw/hppa/Kconfig +2 -0
index ee7ffd2bfb5..d4d457f4ab4 100644
@@ -1,5 +1,7 @@
 config HPPA_B160L
     bool
+    default y
+    depends on HPPA
     imply PCI_DEVICES
     imply E1000_PCI
     imply USB_OHCI_PCI
Signature · 1 line
2.44.0
#23 lore raw

PATCH 11/22 meson: make target endianneess available to Kconfig

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. MIPS boards may only be available for big-endian or only for little-endian emulators, add a symbol so that this can be described with a "depends on" clause.

---
 meson.build    | 12 +++++++-----
 target/Kconfig |  3 +++
 2 files changed, 10 insertions(+), 5 deletions(-)
meson.build +7 -5
index 9af60550753..9c4fb027853 100644
@@ -3037,7 +3037,7 @@ foreach target : target_dirs
     }
   endif
 
-  accel_kconfig = []
+  target_kconfig = []
   foreach sym: accelerators
     if sym == 'CONFIG_TCG' or target in accelerator_targets.get(sym, [])
       config_target += { sym: 'y' }
@@ -3047,10 +3047,10 @@ foreach target : target_dirs
       else
         config_target += { 'CONFIG_TCG_BUILTIN': 'y' }
       endif
-      accel_kconfig += [ sym + '=y' ]
+      target_kconfig += [ sym + '=y' ]
     endif
   endforeach
-  if accel_kconfig.length() == 0
+  if target_kconfig.length() == 0
     if default_targets
       continue
     endif
@@ -3110,6 +3110,9 @@ foreach target : target_dirs
                                                configuration: config_target_data)}
 
   if target.endswith('-softmmu')
+    target_kconfig += 'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'
+    target_kconfig += 'CONFIG_TARGET_BIG_ENDIAN=' + config_target['TARGET_BIG_ENDIAN']
+
     config_input = meson.get_external_property(target, 'default')
     config_devices_mak = target + '-config-devices.mak'
     config_devices_mak = configure_file(
@@ -3120,8 +3123,7 @@ foreach target : target_dirs
       command: [minikconf,
                 get_option('default_devices') ? '--defconfig' : '--allnoconfig',
                 config_devices_mak, '@DEPFILE@', '@INPUT@',
-                host_kconfig, accel_kconfig,
-                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
+                host_kconfig, target_kconfig])
 
     config_devices_data = configuration_data()
     config_devices = keyval.load(config_devices_mak)
target/Kconfig +3 -0
index 83da0bd2938..afc00dea30c 100644
@@ -18,3 +18,6 @@ source sh4/Kconfig
 source sparc/Kconfig
 source tricore/Kconfig
 source xtensa/Kconfig
+
+config TARGET_BIG_ENDIAN
+    bool
Signature · 1 line
2.44.0
#10 lore raw

PATCH 4/22 avr: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with AVR.

No changes to generated config-devices.mak file.

---
 configs/devices/avr-softmmu/default.mak | 5 ++---
 hw/avr/Kconfig                          | 3 +++
 2 files changed, 5 insertions(+), 3 deletions(-)
configs/devices/avr-softmmu/default.mak +2 -3
index 80218add98c..4207e7b3ce2 100644
@@ -1,5 +1,4 @@
 # Default configuration for avr-softmmu
 
-# Boards:
-#
-CONFIG_ARDUINO=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARDUINO=n
hw/avr/Kconfig +3 -0
index d31298c3cce..b29937be414 100644
@@ -5,5 +5,8 @@ config AVR_ATMEGA_MCU
     select AVR_POWER
 
 config ARDUINO
+    bool
+    default y
+    depends on AVR
     select AVR_ATMEGA_MCU
     select UNIMP
Signature · 1 line
2.44.0
#31 lore raw

PATCH 16/22 riscv: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RISC-V.

No changes to generated config-devices.mak file.

---
 configs/devices/riscv32-softmmu/default.mak | 13 ++++++-------
 configs/devices/riscv64-softmmu/default.mak | 15 +++++++--------
 hw/riscv/Kconfig                            | 14 ++++++++++++++
 3 files changed, 27 insertions(+), 15 deletions(-)
configs/devices/riscv32-softmmu/default.mak +6 -7
index 07e4fd26df3..c2cd86ce05f 100644
@@ -4,10 +4,9 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_SPIKE=y
-CONFIG_SIFIVE_E=y
-CONFIG_SIFIVE_U=y
-CONFIG_RISCV_VIRT=y
-CONFIG_OPENTITAN=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SPIKE=n
+# CONFIG_SIFIVE_E=n
+# CONFIG_SIFIVE_U=n
+# CONFIG_RISCV_VIRT=n
+# CONFIG_OPENTITAN=n
configs/devices/riscv64-softmmu/default.mak +7 -8
index 221963d4c5c..39ed3a0061a 100644
@@ -4,11 +4,10 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_SPIKE=y
-CONFIG_SIFIVE_E=y
-CONFIG_SIFIVE_U=y
-CONFIG_RISCV_VIRT=y
-CONFIG_MICROCHIP_PFSOC=y
-CONFIG_SHAKTI_C=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SPIKE=n
+# CONFIG_SIFIVE_E=n
+# CONFIG_SIFIVE_U=n
+# CONFIG_RISCV_VIRT=n
+# CONFIG_MICROCHIP_PFSOC=n
+# CONFIG_SHAKTI_C=n
hw/riscv/Kconfig +14 -0
index 5d644eb7b16..b2955a8ae77 100644
@@ -8,6 +8,8 @@ config IBEX
 
 config MICROCHIP_PFSOC
     bool
+    default y
+    depends on RISCV64
     select CADENCE_SDHCI
     select MCHP_PFSOC_DMC
     select MCHP_PFSOC_IOSCB
@@ -20,12 +22,16 @@ config MICROCHIP_PFSOC
 
 config OPENTITAN
     bool
+    default y
+    depends on RISCV32
     select IBEX
     select SIFIVE_PLIC
     select UNIMP
 
 config RISCV_VIRT
     bool
+    default y
+    depends on RISCV32 || RISCV64
     imply PCI_DEVICES
     imply VIRTIO_VGA
     imply TEST_DEVICES
@@ -50,6 +56,8 @@ config RISCV_VIRT
 
 config SHAKTI_C
     bool
+    default y
+    depends on RISCV64
     select RISCV_ACLINT
     select SHAKTI_UART
     select SIFIVE_PLIC
@@ -57,6 +65,8 @@ config SHAKTI_C
 
 config SIFIVE_E
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select RISCV_ACLINT
     select SIFIVE_GPIO
     select SIFIVE_PLIC
@@ -67,6 +77,8 @@ config SIFIVE_E
 
 config SIFIVE_U
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select CADENCE
     select RISCV_ACLINT
     select SIFIVE_GPIO
@@ -83,6 +95,8 @@ config SIFIVE_U
 
 config SPIKE
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select RISCV_NUMA
     select HTIF
     select RISCV_ACLINT
Signature · 1 line
2.44.0
#12 lore raw

PATCH 5/22 cris: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with CRIS.

No changes to generated config-devices.mak file.

---
 configs/devices/cris-softmmu/default.mak | 5 ++---
 hw/cris/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)
configs/devices/cris-softmmu/default.mak +2 -3
index 5932cf4d06f..ff73cd40847 100644
@@ -1,5 +1,4 @@
 # Default configuration for cris-softmmu
 
-# Boards:
-#
-CONFIG_AXIS=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_AXIS=n
hw/cris/Kconfig +2 -0
index 884ad2cbc0d..26c7eef7437 100644
@@ -1,5 +1,7 @@
 config AXIS
     bool
+    default y
+    depends on CRIS
     select ETRAXFS
     select PFLASH_CFI02
     select NAND
Signature · 1 line
2.44.0
#17 lore raw

PATCH 8/22 loongarch: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Loongarch.

No changes to generated config-devices.mak file.

---
 configs/devices/loongarch64-softmmu/default.mak | 3 ++-
 hw/loongarch/Kconfig                            | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/loongarch64-softmmu/default.mak +2 -1
index 0893112b81d..ffe705836fd 100644
@@ -3,4 +3,5 @@
 # Uncomment the following lines to disable these optional devices:
 # CONFIG_PCI_DEVICES=n
 
-CONFIG_LOONGARCH_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_LOONGARCH_VIRT=n
hw/loongarch/Kconfig +2 -0
index 5727efed6d8..78640505630 100644
@@ -1,5 +1,7 @@
 config LOONGARCH_VIRT
     bool
+    default y
+    depends on LOONGARCH64
     select PCI
     select PCI_EXPRESS_GENERIC_BRIDGE
     imply VIRTIO_VGA
Signature · 1 line
2.44.0
#26 lore raw

PATCH 13/22 nios2: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Nios2.

No changes to generated config-devices.mak file.

---
 configs/devices/nios2-softmmu/default.mak | 7 +++----
 hw/nios2/Kconfig                          | 9 ++++-----
 2 files changed, 7 insertions(+), 9 deletions(-)
configs/devices/nios2-softmmu/default.mak +3 -4
index e130d024e62..50a68d26b0f 100644
@@ -1,6 +1,5 @@
 # Default configuration for nios2-softmmu
 
-# Boards:
-#
-CONFIG_NIOS2_10M50=y
-CONFIG_NIOS2_GENERIC_NOMMU=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_NIOS2_10M50=n
+# CONFIG_NIOS2_GENERIC_NOMMU=n
hw/nios2/Kconfig +4 -5
index 4748ae27b67..ab7866a5358 100644
@@ -1,13 +1,12 @@
 config NIOS2_10M50
     bool
-    select NIOS2
+    default y
+    depends on NIOS2
     select SERIAL
     select ALTERA_TIMER
     select NIOS2_VIC
 
 config NIOS2_GENERIC_NOMMU
     bool
-    select NIOS2
-
-config NIOS2
-    bool
+    default y
+    depends on NIOS2
Signature · 1 line
2.44.0
#35 lore raw

PATCH 18/22 s390x: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with s390.

No changes to generated config-devices.mak file.

---
 configs/devices/s390x-softmmu/default.mak | 5 ++---
 hw/s390x/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)
configs/devices/s390x-softmmu/default.mak +2 -3
index 6d87bc8b4b0..340c1092922 100644
@@ -9,6 +9,5 @@
 #CONFIG_WDT_DIAG288=n
 #CONFIG_PCIE_DEVICES=n
 
-# Boards:
-#
-CONFIG_S390_CCW_VIRTIO=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_S390_CCW_VIRTIO=n
hw/s390x/Kconfig +2 -0
index 26ad1044858..3bbf4ae56e4 100644
@@ -1,5 +1,7 @@
 config S390_CCW_VIRTIO
     bool
+    default y
+    depends on S390X
     imply VIRTIO_PCI
     imply TERMINAL3270
     imply VFIO_AP
Signature · 1 line
2.44.0
#28 lore raw

PATCH 14/22 openrisc: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with OpenRISC.

No changes to generated config-devices.mak file.

---
 configs/devices/or1k-softmmu/default.mak | 5 ++---
 hw/openrisc/Kconfig                      | 4 ++++
 2 files changed, 6 insertions(+), 3 deletions(-)
configs/devices/or1k-softmmu/default.mak +2 -3
index 3aecdf9d738..efe3bc278bc 100644
@@ -5,6 +5,5 @@
 # CONFIG_TEST_DEVICES=n
 
 # Boards:
-#
-CONFIG_OR1K_SIM=y
-CONFIG_OR1K_VIRT=y
+# CONFIG_OR1K_SIM=n
+# CONFIG_OR1K_VIRT=n
hw/openrisc/Kconfig +4 -0
index 97af258b556..9c9015e0a5d 100644
@@ -1,5 +1,7 @@
 config OR1K_SIM
     bool
+    default y
+    depends on OPENRISC
     select SERIAL
     select OPENCORES_ETH
     select OMPIC
@@ -7,6 +9,8 @@ config OR1K_SIM
 
 config OR1K_VIRT
     bool
+    default y
+    depends on OPENRISC
     imply PCI_DEVICES
     imply VIRTIO_VGA
     imply TEST_DEVICES
Signature · 1 line
2.44.0
#41 lore raw

PATCH 22/22 xtensa: switch boards to "default y"

In reply to Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Xtensa.

No changes to generated config-devices.mak file.

---
 configs/devices/xtensa-softmmu/default.mak | 9 ++++-----
 hw/xtensa/Kconfig                          | 6 ++++++
 2 files changed, 10 insertions(+), 5 deletions(-)
configs/devices/xtensa-softmmu/default.mak +4 -5
index f650cad7609..fbc3079a943 100644
@@ -4,8 +4,7 @@
 #
 #CONFIG_PCI_DEVICES=n
 
-# Boards:
-#
-CONFIG_XTENSA_SIM=y
-CONFIG_XTENSA_VIRT=y
-CONFIG_XTENSA_XTFPGA=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_XTENSA_SIM=n
+# CONFIG_XTENSA_VIRT=n
+# CONFIG_XTENSA_XTFPGA=n
hw/xtensa/Kconfig +6 -0
index 0740657ea58..443b415c2ba 100644
@@ -1,14 +1,20 @@
 config XTENSA_SIM
+    default y
+    depends on XTENSA
     bool
 
 config XTENSA_VIRT
     bool
+    default y
+    depends on XTENSA
     select XTENSA_SIM
     select PCI_EXPRESS_GENERIC_BRIDGE
     select PCI_DEVICES
 
 config XTENSA_XTFPGA
     bool
+    default y
+    depends on XTENSA
     select OPENCORES_ETH
     select PFLASH_CFI01
     select SERIAL
Signature · 1 line
2.44.0
Reviewed-by on v1 4/22
#11 lore raw

Re: [PATCH 04/22] avr: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with AVR.

No changes to generated config-devices.mak file.

---
  configs/devices/avr-softmmu/default.mak | 5 ++---
  hw/avr/Kconfig                          | 3 +++
  2 files changed, 5 insertions(+), 3 deletions(-)
Reviewed-by on v1 17/22
#34 lore raw

Re: [PATCH 17/22] rx: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RX.

No changes to generated config-devices.mak file.

---
  configs/devices/rx-softmmu/default.mak | 3 ++-
  hw/rx/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
Reviewed-by on v1 19/22
#37 lore raw

Re: [PATCH 19/22] sh4: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with SH.

No changes to generated config-devices.mak file.

---
  configs/devices/sh4-softmmu/default.mak | 7 +++----
  hw/sh4/Kconfig                          | 4 ++++
  2 files changed, 7 insertions(+), 4 deletions(-)
Reviewed-by on v1 21/22
#40 lore raw

Re: [PATCH 21/22] tricore: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with TriCore.

No changes to generated config-devices.mak file.

---
  configs/devices/tricore-softmmu/default.mak | 7 +++++--
  hw/tricore/Kconfig                          | 4 ++++
  2 files changed, 9 insertions(+), 2 deletions(-)
Reviewed-by on v1 22/22
#42 lore raw

Re: [PATCH 22/22] xtensa: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Xtensa.

No changes to generated config-devices.mak file.

---
  configs/devices/xtensa-softmmu/default.mak | 9 ++++-----
  hw/xtensa/Kconfig                          | 6 ++++++
  2 files changed, 10 insertions(+), 5 deletions(-)
Reviewed-by on v1 10/22
#22 lore raw

Re: [PATCH 10/22] microblaze: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Microblaze.

No changes to generated config-devices.mak file.

---
  configs/devices/microblaze-softmmu/default.mak | 9 ++++-----
  hw/microblaze/Kconfig                          | 6 ++++++
  2 files changed, 10 insertions(+), 5 deletions(-)
Reviewed-by on v1 9/22
#20 lore raw

Re: [PATCH 09/22] m68k: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with m68k.

No changes to generated config-devices.mak file.

---
  configs/devices/m68k-softmmu/default.mak | 13 ++++++-------
  hw/m68k/Kconfig                          | 10 ++++++++++
  2 files changed, 16 insertions(+), 7 deletions(-)
Reviewed-by on v1 6/22
#15 lore raw

Re: [PATCH 06/22] hppa: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with PARISC.

No changes to generated config-devices.mak file.

---
  configs/devices/hppa-softmmu/default.mak | 5 ++---
  hw/hppa/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 3 deletions(-)
Reviewed-by on v1 5/22
#13 lore raw

Re: [PATCH 05/22] cris: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with CRIS.

No changes to generated config-devices.mak file.

---
  configs/devices/cris-softmmu/default.mak | 5 ++---
  hw/cris/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 3 deletions(-)
Reviewed-by on v1 2/22
#3 lore raw

Re: [PATCH 02/22] alpha: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Start with Alpha.

No changes to generated config-devices.mak file.

---
  configs/devices/alpha-softmmu/default.mak | 5 ++---
  hw/alpha/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 3 deletions(-)
Reviewed-by on v1 8/22
#18 lore raw

Re: [PATCH 08/22] loongarch: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Loongarch.

No changes to generated config-devices.mak file.

---
  configs/devices/loongarch64-softmmu/default.mak | 3 ++-
  hw/loongarch/Kconfig                            | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
Reviewed-by on v1 14/22
#29 lore raw

Re: [PATCH 14/22] openrisc: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with OpenRISC.

No changes to generated config-devices.mak file.

---
  configs/devices/or1k-softmmu/default.mak | 5 ++---
  hw/openrisc/Kconfig                      | 4 ++++
  2 files changed, 6 insertions(+), 3 deletions(-)
Reviewed-by on v1 13/22
#27 lore raw

Re: [PATCH 13/22] nios2: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 11 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with Nios2.

No changes to generated config-devices.mak file.

---
  configs/devices/nios2-softmmu/default.mak | 7 +++----
  hw/nios2/Kconfig                          | 9 ++++-----
  2 files changed, 7 insertions(+), 9 deletions(-)

Hopefully this gone will be gone before you get a chance to merge this commit =)

#43 lore raw
In reply to Paolo Bonzini
Quoted 7 lines · Paolo Bonzini

Some boards, notably ARM boards that use TCG, are already using "default y". This was done to remove TCG-only boards from a KVM-only build in commit 29d9efca16 (2023-04-26).

This series converts all other boards to that, so that the requirements of each board are clearer in the Kconfig files.

Quoted 8 lines

For now, the only such use is MIPS's 64-bit and endianness requirements. In the future, it will be possible to enable/disable boards based on the presence of required libraries, for example libfdt, or their deprecation status.

There is an important difference in that Kconfig symbols for boards have to be enabled in a --without-default-devices build, similar to devices.

And how do we make that happen?

Quoted 78 lines

Paolo

Paolo Bonzini (22):
configs: list "implied" device groups in the default configs
alpha: switch boards to "default y"
arm: switch boards to "default y"
avr: switch boards to "default y"
cris: switch boards to "default y"
hppa: switch boards to "default y"
i386: switch boards to "default y"
loongarch: switch boards to "default y"
m68k: switch boards to "default y"
microblaze: switch boards to "default y"
meson: make target endianneess available to Kconfig
mips: switch boards to "default y"
nios2: switch boards to "default y"
openrisc: switch boards to "default y"
ppc: switch boards to "default y"
riscv: switch boards to "default y"
rx: switch boards to "default y"
s390x: switch boards to "default y"
sh4: switch boards to "default y"
sparc: switch boards to "default y"
tricore: switch boards to "default y"
xtensa: switch boards to "default y"

 configs/devices/alpha-softmmu/default.mak     |  5 ++--
 configs/devices/arm-softmmu/default.mak       |  5 +++-
 configs/devices/avr-softmmu/default.mak       |  5 ++--
 configs/devices/cris-softmmu/default.mak      |  5 ++--
 configs/devices/hppa-softmmu/default.mak      |  5 ++--
 configs/devices/i386-softmmu/default.mak      | 11 ++++---
 .../devices/loongarch64-softmmu/default.mak   |  6 +++-
 configs/devices/m68k-softmmu/default.mak      | 13 ++++----
 .../devices/microblaze-softmmu/default.mak    |  9 +++---
 configs/devices/mips-softmmu/common.mak       |  5 ++--
 configs/devices/mips64-softmmu/default.mak    |  4 ++-
 configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
 configs/devices/nios2-softmmu/default.mak     |  7 ++---
 configs/devices/or1k-softmmu/default.mak      |  9 ++++--
 configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
 configs/devices/ppc64-softmmu/default.mak     |  8 ++---
 configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
 configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
 configs/devices/rx-softmmu/default.mak        |  3 +-
 configs/devices/s390x-softmmu/default.mak     |  5 ++--
 configs/devices/sh4-softmmu/default.mak       |  7 ++---
 configs/devices/sparc-softmmu/default.mak     |  7 ++---
 configs/devices/sparc64-softmmu/default.mak   |  7 ++---
 configs/devices/tricore-softmmu/default.mak   |  7 +++--
 configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
 meson.build                                   | 12 ++++----
 hw/alpha/Kconfig                              |  2 ++
 hw/arm/Kconfig                                |  2 ++
 hw/avr/Kconfig                                |  3 ++
 hw/cris/Kconfig                               |  2 ++
 hw/hppa/Kconfig                               |  2 ++
 hw/i386/Kconfig                               | 10 ++++++-
 hw/loongarch/Kconfig                          |  2 ++
 hw/m68k/Kconfig                               | 10 +++++++
 hw/microblaze/Kconfig                         |  6 ++++
 hw/mips/Kconfig                               | 12 ++++++++
 hw/nios2/Kconfig                              |  9 +++---
 hw/openrisc/Kconfig                           |  4 +++
 hw/ppc/Kconfig                                | 26 ++++++++++++++++
 hw/riscv/Kconfig                              | 14 +++++++++
 hw/rx/Kconfig                                 |  2 ++
 hw/s390x/Kconfig                              |  2 ++
 hw/sh4/Kconfig                                |  4 +++
 hw/sparc/Kconfig                              |  4 +++
 hw/sparc64/Kconfig                            |  4 +++
 hw/tricore/Kconfig                            |  4 +++
 hw/xtensa/Kconfig                             |  6 ++++
 target/Kconfig                                |  3 ++
 target/i386/Kconfig                           |  1 +
 target/ppc/Kconfig                            |  1 +
 50 files changed, 252 insertions(+), 115 deletions(-)
#5 lore raw

Re: [PATCH 03/22] arm: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 30 lines · Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

---
 configs/devices/arm-softmmu/default.mak | 3 ++-
 hw/arm/Kconfig                          | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/arm-softmmu/default.mak +2 -1
index c1cfb3bcf75..31f77c20269 100644
@@ -5,7 +5,8 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
 # These are selected by default when TCG is enabled, uncomment them to
 # keep out of the build.
hw/arm/Kconfig +0 -0
index 893a7bff66b..1e7cd01087f 100644

hw/arm/Kconfig line 5

Quoted 5 lines
hw/arm/Kconfig +2 -0
@@ -1,5 +1,7 @@
 config ARM_VIRT
     bool
+    default y
+    depends on ARM
     imply PCI_DEVICES

We lose pci.c when building --without-default-devices:

$ arch
aarch64
$ ../configure --target-list=aarch64-softmmu,arm-softmmu
--disable-linux-user --without-default-devices
$ make
...
libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route':
../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space'
Quoted 2 lines
hw/arm/Kconfig +0 -0
     imply TEST_DEVICES
     imply VFIO_AMD_XGBE
#44 lore raw
In reply to Fabiano Rosas

Il mar 23 apr 2024, 19:57 Fabiano Rosas <[email protected]> ha scritto:

Quoted 6 lines
Quoted 3 lines

There is an important difference in that Kconfig symbols for boards have to be enabled in a --without-default-devices build, similar to devices.

And how do we make that happen?

Before building you edit configs/devices/ to set e.g. CONFIG_ARM_VIRT=y, just like you did in order to enable devices.

Paolo

Quoted 80 lines
Quoted 78 lines

Paolo

Paolo Bonzini (22):
configs: list "implied" device groups in the default configs
alpha: switch boards to "default y"
arm: switch boards to "default y"
avr: switch boards to "default y"
cris: switch boards to "default y"
hppa: switch boards to "default y"
i386: switch boards to "default y"
loongarch: switch boards to "default y"
m68k: switch boards to "default y"
microblaze: switch boards to "default y"
meson: make target endianneess available to Kconfig
mips: switch boards to "default y"
nios2: switch boards to "default y"
openrisc: switch boards to "default y"
ppc: switch boards to "default y"
riscv: switch boards to "default y"
rx: switch boards to "default y"
s390x: switch boards to "default y"
sh4: switch boards to "default y"
sparc: switch boards to "default y"
tricore: switch boards to "default y"
xtensa: switch boards to "default y"

 configs/devices/alpha-softmmu/default.mak     |  5 ++--
 configs/devices/arm-softmmu/default.mak       |  5 +++-
 configs/devices/avr-softmmu/default.mak       |  5 ++--
 configs/devices/cris-softmmu/default.mak      |  5 ++--
 configs/devices/hppa-softmmu/default.mak      |  5 ++--
 configs/devices/i386-softmmu/default.mak      | 11 ++++---
 .../devices/loongarch64-softmmu/default.mak   |  6 +++-
 configs/devices/m68k-softmmu/default.mak      | 13 ++++----
 .../devices/microblaze-softmmu/default.mak    |  9 +++---
 configs/devices/mips-softmmu/common.mak       |  5 ++--
 configs/devices/mips64-softmmu/default.mak    |  4 ++-
 configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
 configs/devices/nios2-softmmu/default.mak     |  7 ++---
 configs/devices/or1k-softmmu/default.mak      |  9 ++++--
 configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
 configs/devices/ppc64-softmmu/default.mak     |  8 ++---
 configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
 configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
 configs/devices/rx-softmmu/default.mak        |  3 +-
 configs/devices/s390x-softmmu/default.mak     |  5 ++--
 configs/devices/sh4-softmmu/default.mak       |  7 ++---
 configs/devices/sparc-softmmu/default.mak     |  7 ++---
 configs/devices/sparc64-softmmu/default.mak   |  7 ++---
 configs/devices/tricore-softmmu/default.mak   |  7 +++--
 configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
 meson.build                                   | 12 ++++----
 hw/alpha/Kconfig                              |  2 ++
 hw/arm/Kconfig                                |  2 ++
 hw/avr/Kconfig                                |  3 ++
 hw/cris/Kconfig                               |  2 ++
 hw/hppa/Kconfig                               |  2 ++
 hw/i386/Kconfig                               | 10 ++++++-
 hw/loongarch/Kconfig                          |  2 ++
 hw/m68k/Kconfig                               | 10 +++++++
 hw/microblaze/Kconfig                         |  6 ++++
 hw/mips/Kconfig                               | 12 ++++++++
 hw/nios2/Kconfig                              |  9 +++---
 hw/openrisc/Kconfig                           |  4 +++
 hw/ppc/Kconfig                                | 26 ++++++++++++++++
 hw/riscv/Kconfig                              | 14 +++++++++
 hw/rx/Kconfig                                 |  2 ++
 hw/s390x/Kconfig                              |  2 ++
 hw/sh4/Kconfig                                |  4 +++
 hw/sparc/Kconfig                              |  4 +++
 hw/sparc64/Kconfig                            |  4 +++
 hw/tricore/Kconfig                            |  4 +++
 hw/xtensa/Kconfig                             |  6 ++++
 target/Kconfig                                |  3 ++
 target/i386/Kconfig                           |  1 +
 target/ppc/Kconfig                            |  1 +
 50 files changed, 252 insertions(+), 115 deletions(-)
#6 lore raw

Re: [PATCH 03/22] arm: switch boards to "default y"

In reply to Fabiano Rosas

Hi Fabiano,

Quoted 40 lines · Fabiano Rosas
Quoted 30 lines · Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

---
  configs/devices/arm-softmmu/default.mak | 3 ++-
  hw/arm/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/arm-softmmu/default.mak +2 -1
index c1cfb3bcf75..31f77c20269 100644
@@ -5,7 +5,8 @@
  # CONFIG_PCI_DEVICES=n
  # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
  # These are selected by default when TCG is enabled, uncomment them to
  # keep out of the build.
hw/arm/Kconfig +0 -0
index 893a7bff66b..1e7cd01087f 100644

hw/arm/Kconfig line 5

Quoted 5 lines
hw/arm/Kconfig +2 -0
@@ -1,5 +1,7 @@
  config ARM_VIRT
      bool
+    default y
+    depends on ARM
      imply PCI_DEVICES

We lose pci.c when building --without-default-devices:

Quoted 8 lines
$ arch
aarch64
$ ../configure --target-list=aarch64-softmmu,arm-softmmu
--disable-linux-user --without-default-devices
$ make
...
libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route':
../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space'

IIRC QEMU isn't yet ready to be built with --without-default-devices but without any machine, you need to explicit at least one. For example you can use --with-devices-aarch64=minimal, or define a config with only the Virt machine.

Regards,

Phil.

#7 lore raw

Re: [PATCH 03/22] arm: switch boards to "default y"

Quoted 52 lines · Philippe Mathieu-Daudé

Hi Fabiano,

Quoted 40 lines · Fabiano Rosas
Quoted 30 lines · Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

---
  configs/devices/arm-softmmu/default.mak | 3 ++-
  hw/arm/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
configs/devices/arm-softmmu/default.mak +2 -1
index c1cfb3bcf75..31f77c20269 100644
@@ -5,7 +5,8 @@
  # CONFIG_PCI_DEVICES=n
  # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
  # These are selected by default when TCG is enabled, uncomment them to
  # keep out of the build.
hw/arm/Kconfig +0 -0
index 893a7bff66b..1e7cd01087f 100644

hw/arm/Kconfig line 5

Quoted 5 lines
hw/arm/Kconfig +2 -0
@@ -1,5 +1,7 @@
  config ARM_VIRT
      bool
+    default y
+    depends on ARM
      imply PCI_DEVICES

We lose pci.c when building --without-default-devices:

Quoted 8 lines
$ arch
aarch64
$ ../configure --target-list=aarch64-softmmu,arm-softmmu
--disable-linux-user --without-default-devices
$ make
...
libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function `kvm_arch_fixup_msi_route':
../target/arm/kvm.c:1548: undefined reference to `pci_device_iommu_address_space'
Quoted 4 lines

IIRC QEMU isn't yet ready to be built with --without-default-devices but without any machine, you need to explicit at least one. For example you can use --with-devices-aarch64=minimal, or define a config with only the Virt machine.

Could we detect this kind of breakage somehow and report it properly to the user? As in "you chose an impossible configuration, select a board and try again".

I see this comes from kvm.c, perhaps on arm CONFIG_KVM needs to depend on VIRT?

Quoted 4 lines

Regards,

Phil.

#8 lore raw

Re: [PATCH 03/22] arm: switch boards to "default y"

In reply to Philippe Mathieu-Daudé

Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 51 lines

Hi Fabiano,

Quoted 7 lines · Fabiano Rosas
Quoted 5 lines · Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

Quoted 7 lines

Review

Quoted 7 lines
---
  configs/devices/arm-softmmu/default.mak | 3 ++-
  hw/arm/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/configs/devices/arm-softmmu/default.mak

Quoted 26 lines
Quoted 18 lines

index c1cfb3bcf75..31f77c20269 100644

configs/devices/arm-softmmu/default.mak +2 -1
@@ -5,7 +5,8 @@
  # CONFIG_PCI_DEVICES=n
  # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
  # These are selected by default when TCG is enabled, uncomment them to
  # keep out of the build.
hw/arm/Kconfig +0 -0
index 893a7bff66b..1e7cd01087f 100644

hw/arm/Kconfig line 5

Quoted 5 lines
hw/arm/Kconfig +2 -0
@@ -1,5 +1,7 @@
  config ARM_VIRT
      bool
+    default y
+    depends on ARM
      imply PCI_DEVICES

We lose pci.c when building --without-default-devices:

Quoted 7 lines
$ arch
aarch64
$ ../configure --target-list=aarch64-softmmu,arm-softmmu
--disable-linux-user --without-default-devices
$ make
...
libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function
Quoted 4 lines

`kvm_arch_fixup_msi_route':

Quoted 1 line

../target/arm/kvm.c:1548: undefined reference to

`pci_device_iommu_address_space'

I guess we can add something like

config AARCH64
select PCI if KVM

Paolo

IIRC QEMU isn't yet ready to be built with --without-default-devices

Quoted 3 lines

but without any machine, you need to explicit at least one. For example you can use --with-devices-aarch64=minimal, or define a config with only the Virt machine.

Paolo

Quoted 5 lines

Regards,

Phil.

Tested-by
#9 lore raw

Re: [PATCH 03/22] arm: switch boards to "default y"

Quoted 55 lines · Paolo Bonzini

Il mar 23 apr 2024, 20:12 Philippe Mathieu-Daudé <[email protected]> ha scritto:

Quoted 52 lines

Hi Fabiano,

Quoted 7 lines · Fabiano Rosas
Quoted 5 lines · Paolo Bonzini

For ARM targets, boards that require TCG are already using "default y". Switch ARM_VIRT to the same selection mechanism.

No changes to generated config-devices.mak file.

Quoted 7 lines

Review

Quoted 7 lines
---
  configs/devices/arm-softmmu/default.mak | 3 ++-
  hw/arm/Kconfig                          | 2 ++
  2 files changed, 4 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/configs/devices/arm-softmmu/default.mak

Quoted 26 lines
Quoted 18 lines

index c1cfb3bcf75..31f77c20269 100644

configs/devices/arm-softmmu/default.mak +2 -1
@@ -5,7 +5,8 @@
  # CONFIG_PCI_DEVICES=n
  # CONFIG_TEST_DEVICES=n
 
-CONFIG_ARM_VIRT=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_ARM_VIRT=n
 
  # These are selected by default when TCG is enabled, uncomment them to
  # keep out of the build.
hw/arm/Kconfig +0 -0
index 893a7bff66b..1e7cd01087f 100644

hw/arm/Kconfig line 5

Quoted 5 lines
hw/arm/Kconfig +2 -0
@@ -1,5 +1,7 @@
  config ARM_VIRT
      bool
+    default y
+    depends on ARM
      imply PCI_DEVICES

We lose pci.c when building --without-default-devices:

Quoted 7 lines
$ arch
aarch64
$ ../configure --target-list=aarch64-softmmu,arm-softmmu
--disable-linux-user --without-default-devices
$ make
...
libqemu-aarch64-softmmu.fa.p/target_arm_kvm.c.o: in function

`kvm_arch_fixup_msi_route':

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

../target/arm/kvm.c:1548: undefined reference to

`pci_device_iommu_address_space'

I guess we can add something like

config AARCH64
select PCI if KVM

Yep, that fixes the build. With defaults disabled the tests are all kinds of broken, but I guess that's expected. I see issues even in master.

With the above included:

Reviewed-by on v1 11/22
#24 lore raw

Re: [PATCH 11/22] meson: make target endianneess available to Kconfig

In reply to Paolo Bonzini
Quoted 7 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. MIPS boards may only be available for big-endian or only for little-endian emulators, add a symbol so that this can be described with a "depends on" clause.

Acked-by on v1 16/22
#32 lore raw

Re: [PATCH 16/22] riscv: switch boards to "default y"

In reply to Paolo Bonzini
Quoted 8 lines · Paolo Bonzini

Some targets use "default y" for boards to filter out those that require TCG. For consistency we are switching all other targets to do the same. Continue with RISC-V.

No changes to generated config-devices.mak file.

Alistair

Quoted 120 lines
---
 configs/devices/riscv32-softmmu/default.mak | 13 ++++++-------
 configs/devices/riscv64-softmmu/default.mak | 15 +++++++--------
 hw/riscv/Kconfig                            | 14 ++++++++++++++
 3 files changed, 27 insertions(+), 15 deletions(-)
configs/devices/riscv32-softmmu/default.mak +6 -7
index 07e4fd26df3..c2cd86ce05f 100644
@@ -4,10 +4,9 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_SPIKE=y
-CONFIG_SIFIVE_E=y
-CONFIG_SIFIVE_U=y
-CONFIG_RISCV_VIRT=y
-CONFIG_OPENTITAN=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SPIKE=n
+# CONFIG_SIFIVE_E=n
+# CONFIG_SIFIVE_U=n
+# CONFIG_RISCV_VIRT=n
+# CONFIG_OPENTITAN=n
configs/devices/riscv64-softmmu/default.mak +7 -8
index 221963d4c5c..39ed3a0061a 100644
@@ -4,11 +4,10 @@
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
-# Boards:
-#
-CONFIG_SPIKE=y
-CONFIG_SIFIVE_E=y
-CONFIG_SIFIVE_U=y
-CONFIG_RISCV_VIRT=y
-CONFIG_MICROCHIP_PFSOC=y
-CONFIG_SHAKTI_C=y
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_SPIKE=n
+# CONFIG_SIFIVE_E=n
+# CONFIG_SIFIVE_U=n
+# CONFIG_RISCV_VIRT=n
+# CONFIG_MICROCHIP_PFSOC=n
+# CONFIG_SHAKTI_C=n
hw/riscv/Kconfig +14 -1
index 5d644eb7b16..b2955a8ae77 100644
@@ -8,6 +8,8 @@ config IBEX
 
 config MICROCHIP_PFSOC
     bool
+    default y
+    depends on RISCV64
     select CADENCE_SDHCI
     select MCHP_PFSOC_DMC
     select MCHP_PFSOC_IOSCB
@@ -20,12 +22,16 @@ config MICROCHIP_PFSOC
 
 config OPENTITAN
     bool
+    default y
+    depends on RISCV32
     select IBEX
     select SIFIVE_PLIC
     select UNIMP
 
 config RISCV_VIRT
     bool
+    default y
+    depends on RISCV32 || RISCV64
     imply PCI_DEVICES
     imply VIRTIO_VGA
     imply TEST_DEVICES
@@ -50,6 +56,8 @@ config RISCV_VIRT
 
 config SHAKTI_C
     bool
+    default y
+    depends on RISCV64
     select RISCV_ACLINT
     select SHAKTI_UART
     select SIFIVE_PLIC
@@ -57,6 +65,8 @@ config SHAKTI_C
 
 config SIFIVE_E
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select RISCV_ACLINT
     select SIFIVE_GPIO
     select SIFIVE_PLIC
@@ -67,6 +77,8 @@ config SIFIVE_E
 
 config SIFIVE_U
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select CADENCE
     select RISCV_ACLINT
     select SIFIVE_GPIO
@@ -83,6 +95,8 @@ config SIFIVE_U
 
 config SPIKE
     bool
+    default y
+    depends on RISCV32 || RISCV64
     select RISCV_NUMA
     select HTIF
     select RISCV_ACLINT
--

2.44.0

#45 lore raw
In reply to Paolo Bonzini
Quoted 8 lines · Paolo Bonzini

Some boards, notably ARM boards that use TCG, are already using "default y". This was done to remove TCG-only boards from a KVM-only build in commit 29d9efca16 (2023-04-26).

This series converts all other boards to that, so that the requirements of each board are clearer in the Kconfig files.

Quoted 8 lines

For now, the only such use is MIPS's 64-bit and endianness requirements. In the future, it will be possible to enable/disable boards based on the presence of required libraries, for example libfdt, or their deprecation status.

There is an important difference in that Kconfig symbols for boards have to be enabled in a --without-default-devices build, similar to devices.

Running CI shows that some targets now pass build-without-defaults and some don't.

I'm going to squash in changes to each individual patch, resulting in the following diff:

.gitlab-ci.d/buildtest.yml +7 -2
index 6394b8f41e4..e9402a68a79 100644
@@ -648,6 +648,9 @@ build-tci:
     - make check-tcg
 
 # Check our reduced build configurations
+# requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblazeel,
+#   mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64
+# does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86_64
 build-without-defaults:
   extends: .native_build_job_template
   needs:
@@ -661,8 +664,10 @@ build-without-defaults:
       --disable-pie
       --disable-qom-cast-debug
       --disable-strip
-    TARGETS: avr-softmmu s390x-softmmu sh4-softmmu
-      sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
+    TARGETS: alpha-softmmu avr-softmmu cris-softmmu hppa-softmmu m68k-softmmu
+      mips-softmmu mips64-softmmu mipsel-softmmu sparc-softmmu
+      sparc64-softmmu tricore-softmmu xtensa-softmmu xtensaeb-softmmu
+      hexagon-linux-user i386-linux-user s390x-linux-user
     MAKE_CHECK_ARGS: check
 
 build-libvhost-user:

Let me know if you'd prefer me to post a v2.

Paolo