All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] target: Provide target-specific Kconfig
@ 2021-01-31 11:13 Philippe Mathieu-Daudé
  2021-01-31 11:13 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Philippe Mathieu-Daudé
                   ` (10 more replies)
  0 siblings, 11 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

Hi,

This series add a Kconfig file to each target, allowing
to select target-specific features there, instead of from
the hardware Kconfig.

This simplifies managing multi-arch features such semihosting.

Series organization:

1/ Some targets use the architecture symbol to select boards and
peripherals (SH4 and LM32), we need to clean that first.

2/ Introduce empty target Kconfig, update meson.

3/ Move architectural features out of hardware:
   - x86 SEV
   - ARM v7m
   - generic semihosting

[following only important to patchew, unrelated to this series]
Based-on: <20210131105918.228787-1-f4bug@amsat.org>

Philippe Mathieu-Daudé (10):
  hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
  hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
  hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
  hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
  meson: Introduce target-specific Kconfig
  target/i386: Move SEV feature to target Kconfig
  target/arm: Move V7M feature to target Kconfig
  default-configs: Remove unnecessary SEMIHOSTING selection
  target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
  target: Move SEMIHOSTING feature to target Kconfig

 default-configs/devices/arm-softmmu.mak       |  2 --
 default-configs/devices/lm32-softmmu.mak      |  4 +---
 default-configs/devices/m68k-softmmu.mak      |  2 --
 .../devices/mips-softmmu-common.mak           |  3 ---
 default-configs/devices/nios2-softmmu.mak     |  2 --
 default-configs/devices/riscv32-softmmu.mak   |  2 --
 default-configs/devices/riscv64-softmmu.mak   |  2 --
 default-configs/devices/unicore32-softmmu.mak |  1 -
 default-configs/devices/xtensa-softmmu.mak    |  2 --
 meson.build                                   |  3 ++-
 Kconfig                                       |  1 +
 hw/arm/Kconfig                                |  4 ----
 hw/block/meson.build                          |  2 +-
 hw/char/meson.build                           |  6 ++---
 hw/i386/Kconfig                               |  4 ----
 hw/intc/meson.build                           |  4 ++--
 hw/lm32/Kconfig                               | 10 +++++---
 hw/lm32/meson.build                           |  2 +-
 hw/sh4/Kconfig                                |  6 ++---
 hw/timer/meson.build                          |  4 ++--
 target/Kconfig                                | 23 +++++++++++++++++++
 target/alpha/Kconfig                          |  2 ++
 target/arm/Kconfig                            | 11 +++++++++
 target/avr/Kconfig                            |  2 ++
 target/cris/Kconfig                           |  2 ++
 target/hppa/Kconfig                           |  2 ++
 target/i386/Kconfig                           |  9 ++++++++
 target/lm32/Kconfig                           |  3 +++
 target/m68k/Kconfig                           |  3 +++
 target/microblaze/Kconfig                     |  2 ++
 target/mips/Kconfig                           |  7 ++++++
 target/moxie/Kconfig                          |  2 ++
 target/nios2/Kconfig                          |  3 +++
 target/openrisc/Kconfig                       |  2 ++
 target/ppc/Kconfig                            |  5 ++++
 target/riscv/Kconfig                          |  7 ++++++
 target/rx/Kconfig                             |  2 ++
 target/s390x/Kconfig                          |  2 ++
 target/sh4/Kconfig                            |  2 ++
 target/sparc/Kconfig                          |  5 ++++
 target/tilegx/Kconfig                         |  2 ++
 target/tricore/Kconfig                        |  2 ++
 target/unicore32/Kconfig                      |  3 +++
 target/xtensa/Kconfig                         |  3 +++
 44 files changed, 129 insertions(+), 43 deletions(-)
 create mode 100644 target/Kconfig
 create mode 100644 target/alpha/Kconfig
 create mode 100644 target/arm/Kconfig
 create mode 100644 target/avr/Kconfig
 create mode 100644 target/cris/Kconfig
 create mode 100644 target/hppa/Kconfig
 create mode 100644 target/i386/Kconfig
 create mode 100644 target/lm32/Kconfig
 create mode 100644 target/m68k/Kconfig
 create mode 100644 target/microblaze/Kconfig
 create mode 100644 target/mips/Kconfig
 create mode 100644 target/moxie/Kconfig
 create mode 100644 target/nios2/Kconfig
 create mode 100644 target/openrisc/Kconfig
 create mode 100644 target/ppc/Kconfig
 create mode 100644 target/riscv/Kconfig
 create mode 100644 target/rx/Kconfig
 create mode 100644 target/s390x/Kconfig
 create mode 100644 target/sh4/Kconfig
 create mode 100644 target/sparc/Kconfig
 create mode 100644 target/tilegx/Kconfig
 create mode 100644 target/tricore/Kconfig
 create mode 100644 target/unicore32/Kconfig
 create mode 100644 target/xtensa/Kconfig

-- 
2.26.2



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

* [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 10:24     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

We want to be able to use the 'SH4' config for architecture
specific features. As CONFIG_SH4 is only used to select
peripherals, rename it CONFIG_SH4_PERIPHERALS.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/block/meson.build | 2 +-
 hw/char/meson.build  | 2 +-
 hw/intc/meson.build  | 2 +-
 hw/sh4/Kconfig       | 6 +++---
 hw/timer/meson.build | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/block/meson.build b/hw/block/meson.build
index 602ca6c8541..7f24b42c283 100644
--- a/hw/block/meson.build
+++ b/hw/block/meson.build
@@ -12,7 +12,7 @@
 softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
 softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
 softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
-softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c'))
+softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('tc58128.c'))
 softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c', 'nvme-ns.c'))
 
 specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
diff --git a/hw/char/meson.build b/hw/char/meson.build
index 196ac91fa29..3b8cb6a2f5b 100644
--- a/hw/char/meson.build
+++ b/hw/char/meson.build
@@ -31,7 +31,7 @@
 softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
 softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
 softmmu_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c'))
-softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c'))
+softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_serial.c'))
 softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
 softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
 
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 53cba115690..b05bab2f4b6 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -47,7 +47,7 @@
 specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c'))
 specific_ss.add(when: 'CONFIG_S390_FLIC', if_true: files('s390_flic.c'))
 specific_ss.add(when: 'CONFIG_S390_FLIC_KVM', if_true: files('s390_flic_kvm.c'))
-specific_ss.add(when: 'CONFIG_SH4', if_true: files('sh_intc.c'))
+specific_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_intc.c'))
 specific_ss.add(when: 'CONFIG_SIFIVE_CLINT', if_true: files('sifive_clint.c'))
 specific_ss.add(when: 'CONFIG_SIFIVE_PLIC', if_true: files('sifive_plic.c'))
 specific_ss.add(when: 'CONFIG_XICS', if_true: files('xics.c'))
diff --git a/hw/sh4/Kconfig b/hw/sh4/Kconfig
index 4cbce3a0ed5..fbac8c09152 100644
--- a/hw/sh4/Kconfig
+++ b/hw/sh4/Kconfig
@@ -9,16 +9,16 @@ config R2D
     select USB_OHCI_PCI
     select PCI
     select SM501
-    select SH4
+    select SH4_PERIPHERALS
 
 config SHIX
     bool
     select SH7750
-    select SH4
+    select SH4_PERIPHERALS
 
 config SH7750
     bool
 
-config SH4
+config SH4_PERIPHERALS
     bool
     select PTIMER
diff --git a/hw/timer/meson.build b/hw/timer/meson.build
index be343f68fed..d3f53dce400 100644
--- a/hw/timer/meson.build
+++ b/hw/timer/meson.build
@@ -30,7 +30,7 @@
 softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_ost.c'))
 softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c'))
 softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c'))
-softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_timer.c'))
+softmmu_ss.add(when: 'CONFIG_SH4_PERIPHERALS', if_true: files('sh_timer.c'))
 softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c'))
 softmmu_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c'))
 softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c'))
-- 
2.26.2



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

* [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
  2021-01-31 11:13 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 10:28     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS Philippe Mathieu-Daudé
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

We want to be able to use the 'LM32' config for architecture
specific features. Introduce CONFIG_LM32_EVR to select the
lm32-evr / lm32-uclinux boards.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 default-configs/devices/lm32-softmmu.mak | 2 +-
 hw/lm32/Kconfig                          | 6 +++++-
 hw/lm32/meson.build                      | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
index 115b3e34c98..1bce3f6e8b6 100644
--- a/default-configs/devices/lm32-softmmu.mak
+++ b/default-configs/devices/lm32-softmmu.mak
@@ -8,5 +8,5 @@ CONFIG_SEMIHOSTING=y
 
 # Boards:
 #
-CONFIG_LM32=y
+CONFIG_LM32_EVR=y
 CONFIG_MILKYMIST=y
diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
index ed2e3060b04..20c36edc402 100644
--- a/hw/lm32/Kconfig
+++ b/hw/lm32/Kconfig
@@ -1,7 +1,6 @@
 config LM32
     bool
     select PTIMER
-    select PFLASH_CFI02
 
 config MILKYMIST
     bool
@@ -12,3 +11,8 @@ config MILKYMIST
     select FRAMEBUFFER
     select SD
     select USB_OHCI
+
+config LM32_EVR
+    bool
+    select LM32
+    select PFLASH_CFI02
diff --git a/hw/lm32/meson.build b/hw/lm32/meson.build
index 8caf0a727ff..42d6f8db3d9 100644
--- a/hw/lm32/meson.build
+++ b/hw/lm32/meson.build
@@ -1,6 +1,6 @@
 lm32_ss = ss.source_set()
 # LM32 boards
-lm32_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_boards.c'))
+lm32_ss.add(when: 'CONFIG_LM32_EVR', if_true: files('lm32_boards.c'))
 lm32_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist.c'))
 
 hw_arch += {'lm32': lm32_ss}
-- 
2.26.2



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

* [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
  2021-01-31 11:13 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Philippe Mathieu-Daudé
  2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 10:29     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS Philippe Mathieu-Daudé
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

We want to be able to use the 'LM32' config for architecture
specific features. As CONFIG_LM32 is only used to select
peripherals, rename it CONFIG_LM32_PERIPHERALS.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/char/meson.build  | 4 ++--
 hw/intc/meson.build  | 2 +-
 hw/lm32/Kconfig      | 4 ++--
 hw/timer/meson.build | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/char/meson.build b/hw/char/meson.build
index 3b8cb6a2f5b..b05dcc41c59 100644
--- a/hw/char/meson.build
+++ b/hw/char/meson.build
@@ -8,8 +8,8 @@
 softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
 softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
 softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_juart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_uart.c'))
 softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c'))
 softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
 softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index b05bab2f4b6..bfaab908ac7 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -14,7 +14,7 @@
 softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
 softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_pic.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_pic.c'))
 softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
 softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c'))
 softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_intc.c'))
diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
index 20c36edc402..5867f4db0cf 100644
--- a/hw/lm32/Kconfig
+++ b/hw/lm32/Kconfig
@@ -1,4 +1,4 @@
-config LM32
+config LM32_PERIPHERALS
     bool
     select PTIMER
 
@@ -14,5 +14,5 @@ config MILKYMIST
 
 config LM32_EVR
     bool
-    select LM32
+    select LM32_PERIPHERALS
     select PFLASH_CFI02
diff --git a/hw/timer/meson.build b/hw/timer/meson.build
index d3f53dce400..36ca0d34942 100644
--- a/hw/timer/meson.build
+++ b/hw/timer/meson.build
@@ -19,7 +19,7 @@
 softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c'))
 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_timer.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_PERIPHERALS', if_true: files('lm32_timer.c'))
 softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-sysctl.c'))
 softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c'))
 softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
-- 
2.26.2



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

* [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 11:11     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

The Milkymist board requires more than the PTIMER. Directly
select the LM32_PERIPHERALS. This fixes:

  /usr/bin/ld:
  libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register':
  target/lm32/gdbstub.c:46: undefined reference to `lm32_pic_get_im'
  target/lm32/gdbstub.c:48: undefined reference to `lm32_pic_get_ip'
  libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_im':
  target/lm32/op_helper.c:107: undefined reference to `lm32_pic_set_im'
  libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_ip':
  target/lm32/op_helper.c:114: undefined reference to `lm32_pic_set_ip'
  libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jtx':
  target/lm32/op_helper.c:120: undefined reference to `lm32_juart_set_jtx'
  libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jrx':
  target/lm32/op_helper.c:125: undefined reference to `lm32_juart_set_jrx'
  libqemu-lm32-softmmu.fa.p/target_lm32_translate.c.o: in function `lm32_cpu_dump_state':
  target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_ip'
  target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_im'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/lm32/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
index 5867f4db0cf..38ad22c54e4 100644
--- a/hw/lm32/Kconfig
+++ b/hw/lm32/Kconfig
@@ -6,11 +6,11 @@ config MILKYMIST
     bool
     # FIXME: disabling it results in compile-time errors
     select MILKYMIST_TMU2 if OPENGL && X11
-    select PTIMER
     select PFLASH_CFI01
     select FRAMEBUFFER
     select SD
     select USB_OHCI
+    select LM32_PERIPHERALS
 
 config LM32_EVR
     bool
-- 
2.26.2



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

* [PATCH 05/10] meson: Introduce target-specific Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-01-31 11:40   ` Artyom Tarasenko
                     ` (2 more replies)
  2021-01-31 11:13 ` [PATCH 06/10] target/i386: Move SEV feature to target Kconfig Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  10 siblings, 3 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

Add a target-specific Kconfig.

Target foo now has CONFIG_FOO defined.

Two architecture have a particularity, ARM and MIPS:
their 64-bit version include the 32-bit subset.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
I suppose X86_64 should also select I386?
No clue about PPC/RISCV.
---
 meson.build               |  3 ++-
 Kconfig                   |  1 +
 target/Kconfig            | 23 +++++++++++++++++++++++
 target/alpha/Kconfig      |  2 ++
 target/arm/Kconfig        |  6 ++++++
 target/avr/Kconfig        |  2 ++
 target/cris/Kconfig       |  2 ++
 target/hppa/Kconfig       |  2 ++
 target/i386/Kconfig       |  5 +++++
 target/lm32/Kconfig       |  2 ++
 target/m68k/Kconfig       |  2 ++
 target/microblaze/Kconfig |  2 ++
 target/mips/Kconfig       |  6 ++++++
 target/moxie/Kconfig      |  2 ++
 target/nios2/Kconfig      |  2 ++
 target/openrisc/Kconfig   |  2 ++
 target/ppc/Kconfig        |  5 +++++
 target/riscv/Kconfig      |  5 +++++
 target/rx/Kconfig         |  2 ++
 target/s390x/Kconfig      |  2 ++
 target/sh4/Kconfig        |  2 ++
 target/sparc/Kconfig      |  5 +++++
 target/tilegx/Kconfig     |  2 ++
 target/tricore/Kconfig    |  2 ++
 target/unicore32/Kconfig  |  2 ++
 target/xtensa/Kconfig     |  2 ++
 26 files changed, 92 insertions(+), 1 deletion(-)
 create mode 100644 target/Kconfig
 create mode 100644 target/alpha/Kconfig
 create mode 100644 target/arm/Kconfig
 create mode 100644 target/avr/Kconfig
 create mode 100644 target/cris/Kconfig
 create mode 100644 target/hppa/Kconfig
 create mode 100644 target/i386/Kconfig
 create mode 100644 target/lm32/Kconfig
 create mode 100644 target/m68k/Kconfig
 create mode 100644 target/microblaze/Kconfig
 create mode 100644 target/mips/Kconfig
 create mode 100644 target/moxie/Kconfig
 create mode 100644 target/nios2/Kconfig
 create mode 100644 target/openrisc/Kconfig
 create mode 100644 target/ppc/Kconfig
 create mode 100644 target/riscv/Kconfig
 create mode 100644 target/rx/Kconfig
 create mode 100644 target/s390x/Kconfig
 create mode 100644 target/sh4/Kconfig
 create mode 100644 target/sparc/Kconfig
 create mode 100644 target/tilegx/Kconfig
 create mode 100644 target/tricore/Kconfig
 create mode 100644 target/unicore32/Kconfig
 create mode 100644 target/xtensa/Kconfig

diff --git a/meson.build b/meson.build
index f00b7754fd4..a2dda0ce95e 100644
--- a/meson.build
+++ b/meson.build
@@ -1322,7 +1322,8 @@
       command: [minikconf,
                 get_option('default_devices') ? '--defconfig' : '--allnoconfig',
                 config_devices_mak, '@DEPFILE@', '@INPUT@',
-                host_kconfig, accel_kconfig])
+                host_kconfig, accel_kconfig,
+                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
 
     config_devices_data = configuration_data()
     config_devices = keyval.load(config_devices_mak)
diff --git a/Kconfig b/Kconfig
index bf694c42afe..c01e261e4e9 100644
--- a/Kconfig
+++ b/Kconfig
@@ -1,4 +1,5 @@
 source Kconfig.host
 source backends/Kconfig
 source accel/Kconfig
+source target/Kconfig
 source hw/Kconfig
diff --git a/target/Kconfig b/target/Kconfig
new file mode 100644
index 00000000000..a6f719f223a
--- /dev/null
+++ b/target/Kconfig
@@ -0,0 +1,23 @@
+source alpha/Kconfig
+source arm/Kconfig
+source avr/Kconfig
+source cris/Kconfig
+source hppa/Kconfig
+source i386/Kconfig
+source lm32/Kconfig
+source m68k/Kconfig
+source microblaze/Kconfig
+source mips/Kconfig
+source moxie/Kconfig
+source nios2/Kconfig
+source openrisc/Kconfig
+source ppc/Kconfig
+source riscv/Kconfig
+source rx/Kconfig
+source s390x/Kconfig
+source sh4/Kconfig
+source sparc/Kconfig
+source tilegx/Kconfig
+source tricore/Kconfig
+source unicore32/Kconfig
+source xtensa/Kconfig
diff --git a/target/alpha/Kconfig b/target/alpha/Kconfig
new file mode 100644
index 00000000000..267222c05b8
--- /dev/null
+++ b/target/alpha/Kconfig
@@ -0,0 +1,2 @@
+config ALPHA
+    bool
diff --git a/target/arm/Kconfig b/target/arm/Kconfig
new file mode 100644
index 00000000000..3f3394a22b2
--- /dev/null
+++ b/target/arm/Kconfig
@@ -0,0 +1,6 @@
+config ARM
+    bool
+
+config AARCH64
+    bool
+    select ARM
diff --git a/target/avr/Kconfig b/target/avr/Kconfig
new file mode 100644
index 00000000000..155592d3537
--- /dev/null
+++ b/target/avr/Kconfig
@@ -0,0 +1,2 @@
+config AVR
+    bool
diff --git a/target/cris/Kconfig b/target/cris/Kconfig
new file mode 100644
index 00000000000..3fdc309fbbd
--- /dev/null
+++ b/target/cris/Kconfig
@@ -0,0 +1,2 @@
+config CRIS
+    bool
diff --git a/target/hppa/Kconfig b/target/hppa/Kconfig
new file mode 100644
index 00000000000..395a35d799c
--- /dev/null
+++ b/target/hppa/Kconfig
@@ -0,0 +1,2 @@
+config HPPA
+    bool
diff --git a/target/i386/Kconfig b/target/i386/Kconfig
new file mode 100644
index 00000000000..ce6968906ee
--- /dev/null
+++ b/target/i386/Kconfig
@@ -0,0 +1,5 @@
+config I386
+    bool
+
+config X86_64
+    bool
diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
new file mode 100644
index 00000000000..09de5b703a3
--- /dev/null
+++ b/target/lm32/Kconfig
@@ -0,0 +1,2 @@
+config LM32
+    bool
diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
new file mode 100644
index 00000000000..23debad519a
--- /dev/null
+++ b/target/m68k/Kconfig
@@ -0,0 +1,2 @@
+config M68K
+    bool
diff --git a/target/microblaze/Kconfig b/target/microblaze/Kconfig
new file mode 100644
index 00000000000..a5410d9218d
--- /dev/null
+++ b/target/microblaze/Kconfig
@@ -0,0 +1,2 @@
+config MICROBLAZE
+    bool
diff --git a/target/mips/Kconfig b/target/mips/Kconfig
new file mode 100644
index 00000000000..6adf1453548
--- /dev/null
+++ b/target/mips/Kconfig
@@ -0,0 +1,6 @@
+config MIPS
+    bool
+
+config MIPS64
+    bool
+    select MIPS
diff --git a/target/moxie/Kconfig b/target/moxie/Kconfig
new file mode 100644
index 00000000000..52391bbd289
--- /dev/null
+++ b/target/moxie/Kconfig
@@ -0,0 +1,2 @@
+config MOXIE
+    bool
diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
new file mode 100644
index 00000000000..1529ab8950d
--- /dev/null
+++ b/target/nios2/Kconfig
@@ -0,0 +1,2 @@
+config NIOS2
+    bool
diff --git a/target/openrisc/Kconfig b/target/openrisc/Kconfig
new file mode 100644
index 00000000000..e0da4ac1dfc
--- /dev/null
+++ b/target/openrisc/Kconfig
@@ -0,0 +1,2 @@
+config OPENRISC
+    bool
diff --git a/target/ppc/Kconfig b/target/ppc/Kconfig
new file mode 100644
index 00000000000..3ff152051a3
--- /dev/null
+++ b/target/ppc/Kconfig
@@ -0,0 +1,5 @@
+config PPC
+    bool
+
+config PPC64
+    bool
diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
new file mode 100644
index 00000000000..b9e5932f13f
--- /dev/null
+++ b/target/riscv/Kconfig
@@ -0,0 +1,5 @@
+config RISCV32
+    bool
+
+config RISCV64
+    bool
diff --git a/target/rx/Kconfig b/target/rx/Kconfig
new file mode 100644
index 00000000000..aceb5ed28fe
--- /dev/null
+++ b/target/rx/Kconfig
@@ -0,0 +1,2 @@
+config RX
+    bool
diff --git a/target/s390x/Kconfig b/target/s390x/Kconfig
new file mode 100644
index 00000000000..72da48136c6
--- /dev/null
+++ b/target/s390x/Kconfig
@@ -0,0 +1,2 @@
+config S390X
+    bool
diff --git a/target/sh4/Kconfig b/target/sh4/Kconfig
new file mode 100644
index 00000000000..2397c860280
--- /dev/null
+++ b/target/sh4/Kconfig
@@ -0,0 +1,2 @@
+config SH4
+    bool
diff --git a/target/sparc/Kconfig b/target/sparc/Kconfig
new file mode 100644
index 00000000000..70cc0f3a210
--- /dev/null
+++ b/target/sparc/Kconfig
@@ -0,0 +1,5 @@
+config SPARC
+    bool
+
+config SPARC64
+    bool
diff --git a/target/tilegx/Kconfig b/target/tilegx/Kconfig
new file mode 100644
index 00000000000..aad882826ab
--- /dev/null
+++ b/target/tilegx/Kconfig
@@ -0,0 +1,2 @@
+config TILEGX
+    bool
diff --git a/target/tricore/Kconfig b/target/tricore/Kconfig
new file mode 100644
index 00000000000..93134093093
--- /dev/null
+++ b/target/tricore/Kconfig
@@ -0,0 +1,2 @@
+config TRICORE
+    bool
diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
new file mode 100644
index 00000000000..62c9d10b38f
--- /dev/null
+++ b/target/unicore32/Kconfig
@@ -0,0 +1,2 @@
+config UNICORE32
+    bool
diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
new file mode 100644
index 00000000000..a3c8dc7f6d7
--- /dev/null
+++ b/target/xtensa/Kconfig
@@ -0,0 +1,2 @@
+config XTENSA
+    bool
-- 
2.26.2



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

* [PATCH 06/10] target/i386: Move SEV feature to target Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 11:20     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 07/10] target/arm: Move V7M " Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

SEV is an architecture feature, move its declaration to target/i386/.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/i386/Kconfig     | 4 ----
 target/i386/Kconfig | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 7f91f30877f..3d67c172dab 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -1,7 +1,3 @@
-config SEV
-    bool
-    depends on KVM
-
 config PC
     bool
     imply APPLESMC
diff --git a/target/i386/Kconfig b/target/i386/Kconfig
index ce6968906ee..27c76c554c7 100644
--- a/target/i386/Kconfig
+++ b/target/i386/Kconfig
@@ -3,3 +3,7 @@ config I386
 
 config X86_64
     bool
+
+config SEV
+    bool
+    depends on KVM && I386
-- 
2.26.2



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

* [PATCH 07/10] target/arm: Move V7M feature to target Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 06/10] target/i386: Move SEV feature to target Kconfig Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 11:25     ` Alex Bennée
  2021-01-31 11:13 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

V7M is an architecture feature, move its declaration to target/arm/.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/Kconfig     | 4 ----
 target/arm/Kconfig | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 09298881f2f..f3ecb73a3d8 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -292,10 +292,6 @@ config ZYNQ
     select XILINX_SPIPS
     select ZYNQ_DEVCFG
 
-config ARM_V7M
-    bool
-    select PTIMER
-
 config ALLWINNER_A10
     bool
     select AHCI
diff --git a/target/arm/Kconfig b/target/arm/Kconfig
index 3f3394a22b2..1f05de47ca6 100644
--- a/target/arm/Kconfig
+++ b/target/arm/Kconfig
@@ -4,3 +4,7 @@ config ARM
 config AARCH64
     bool
     select ARM
+
+config ARM_V7M
+    bool
+    select PTIMER
-- 
2.26.2



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

* [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 07/10] target/arm: Move V7M " Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 11:53     ` Alex Bennée
  2021-02-01 19:58     ` Alistair Francis
  2021-01-31 11:13 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  10 siblings, 2 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

Commit 56b5170c87e ("semihosting: Move ARM semihosting code to
shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which
already selects SEMIHOSTING. No need to select it again.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 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(-)

diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
index 0500156a0c7..341d439de6f 100644
--- a/default-configs/devices/arm-softmmu.mak
+++ b/default-configs/devices/arm-softmmu.mak
@@ -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
diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
index d847bd5692e..5c9ad2590ef 100644
--- a/default-configs/devices/riscv32-softmmu.mak
+++ b/default-configs/devices/riscv32-softmmu.mak
@@ -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:
diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
index d5eec75f05e..d5b2e25b6df 100644
--- a/default-configs/devices/riscv64-softmmu.mak
+++ b/default-configs/devices/riscv64-softmmu.mak
@@ -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:
-- 
2.26.2



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

* [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2021-01-31 11:13 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Philippe Mathieu-Daudé
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
  2021-02-01 11:54     ` Alex Bennée
  2021-02-01 19:59     ` Alistair Francis
  2021-01-31 11:13   ` Philippe Mathieu-Daudé
  2021-03-10 13:30   ` Claudio Fontana
  10 siblings, 2 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its
declaration to each target/ARCH/.

Note, we do not modify the linux-user targets, as user-mode builds
don't use Kconfig.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 default-configs/devices/arm-softmmu.mak     | 1 -
 default-configs/devices/riscv32-softmmu.mak | 1 -
 default-configs/devices/riscv64-softmmu.mak | 1 -
 target/arm/Kconfig                          | 1 +
 target/riscv/Kconfig                        | 2 ++
 5 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
index 341d439de6f..0824e9be795 100644
--- a/default-configs/devices/arm-softmmu.mak
+++ b/default-configs/devices/arm-softmmu.mak
@@ -41,5 +41,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
diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
index 5c9ad2590ef..94a236c9c25 100644
--- a/default-configs/devices/riscv32-softmmu.mak
+++ b/default-configs/devices/riscv32-softmmu.mak
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
index d5b2e25b6df..76b61956489 100644
--- a/default-configs/devices/riscv64-softmmu.mak
+++ b/default-configs/devices/riscv64-softmmu.mak
@@ -3,7 +3,6 @@
 # Uncomment the following lines to disable these optional devices:
 #
 #CONFIG_PCI_DEVICES=n
-CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
 
 # Boards:
 #
diff --git a/target/arm/Kconfig b/target/arm/Kconfig
index 1f05de47ca6..ae89d05c7e5 100644
--- a/target/arm/Kconfig
+++ b/target/arm/Kconfig
@@ -1,5 +1,6 @@
 config ARM
     bool
+    select ARM_COMPATIBLE_SEMIHOSTING
 
 config AARCH64
     bool
diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
index b9e5932f13f..c3b9d8a1cf1 100644
--- a/target/riscv/Kconfig
+++ b/target/riscv/Kconfig
@@ -1,5 +1,7 @@
 config RISCV32
     bool
+    select ARM_COMPATIBLE_SEMIHOSTING
 
 config RISCV64
     bool
+    select ARM_COMPATIBLE_SEMIHOSTING
-- 
2.26.2



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

* [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-01-31 11:13   ` Philippe Mathieu-Daudé
  2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
                     ` (9 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, Thomas Huth,
	Philippe Mathieu-Daudé,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Aurelien Jarno

SEMIHOSTING is an architecture feature, move its declaration to
each target/ARCH/.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 default-configs/devices/lm32-softmmu.mak        | 2 --
 default-configs/devices/m68k-softmmu.mak        | 2 --
 default-configs/devices/mips-softmmu-common.mak | 3 ---
 default-configs/devices/nios2-softmmu.mak       | 2 --
 default-configs/devices/unicore32-softmmu.mak   | 1 -
 default-configs/devices/xtensa-softmmu.mak      | 2 --
 target/lm32/Kconfig                             | 1 +
 target/m68k/Kconfig                             | 1 +
 target/mips/Kconfig                             | 1 +
 target/nios2/Kconfig                            | 1 +
 target/unicore32/Kconfig                        | 1 +
 target/xtensa/Kconfig                           | 1 +
 12 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
index 1bce3f6e8b6..1f69795b749 100644
--- a/default-configs/devices/lm32-softmmu.mak
+++ b/default-configs/devices/lm32-softmmu.mak
@@ -4,8 +4,6 @@
 #
 #CONFIG_MILKYMIST_TMU2=n        # disabling it actually causes compile-time failures
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_LM32_EVR=y
diff --git a/default-configs/devices/m68k-softmmu.mak b/default-configs/devices/m68k-softmmu.mak
index 6629fd2aa33..4fef4bd731d 100644
--- a/default-configs/devices/m68k-softmmu.mak
+++ b/default-configs/devices/m68k-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for m68k-softmmu
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_AN5206=y
diff --git a/default-configs/devices/mips-softmmu-common.mak b/default-configs/devices/mips-softmmu-common.mak
index ea78fe72759..af652ec7bdd 100644
--- a/default-configs/devices/mips-softmmu-common.mak
+++ b/default-configs/devices/mips-softmmu-common.mak
@@ -1,8 +1,5 @@
 # Common mips*-softmmu CONFIG defines
 
-# CONFIG_SEMIHOSTING is always required on this architecture
-CONFIG_SEMIHOSTING=y
-
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
diff --git a/default-configs/devices/nios2-softmmu.mak b/default-configs/devices/nios2-softmmu.mak
index 1bc4082ea99..e130d024e62 100644
--- a/default-configs/devices/nios2-softmmu.mak
+++ b/default-configs/devices/nios2-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for nios2-softmmu
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_NIOS2_10M50=y
diff --git a/default-configs/devices/unicore32-softmmu.mak b/default-configs/devices/unicore32-softmmu.mak
index 899288e3d71..0bfce48c6da 100644
--- a/default-configs/devices/unicore32-softmmu.mak
+++ b/default-configs/devices/unicore32-softmmu.mak
@@ -3,4 +3,3 @@
 # Boards:
 #
 CONFIG_PUV3=y
-CONFIG_SEMIHOSTING=y
diff --git a/default-configs/devices/xtensa-softmmu.mak b/default-configs/devices/xtensa-softmmu.mak
index 4fe1bf00c94..49e4c9da88c 100644
--- a/default-configs/devices/xtensa-softmmu.mak
+++ b/default-configs/devices/xtensa-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for Xtensa
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_XTENSA_SIM=y
diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
index 09de5b703a3..286710fd47b 100644
--- a/target/lm32/Kconfig
+++ b/target/lm32/Kconfig
@@ -1,2 +1,3 @@
 config LM32
     bool
+    select SEMIHOSTING
diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
index 23debad519a..9eae71486ff 100644
--- a/target/m68k/Kconfig
+++ b/target/m68k/Kconfig
@@ -1,2 +1,3 @@
 config M68K
     bool
+    select SEMIHOSTING
diff --git a/target/mips/Kconfig b/target/mips/Kconfig
index 6adf1453548..eb19c94c7d4 100644
--- a/target/mips/Kconfig
+++ b/target/mips/Kconfig
@@ -1,5 +1,6 @@
 config MIPS
     bool
+    select SEMIHOSTING
 
 config MIPS64
     bool
diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
index 1529ab8950d..c65550c861a 100644
--- a/target/nios2/Kconfig
+++ b/target/nios2/Kconfig
@@ -1,2 +1,3 @@
 config NIOS2
     bool
+    select SEMIHOSTING
diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
index 62c9d10b38f..c699d5238ea 100644
--- a/target/unicore32/Kconfig
+++ b/target/unicore32/Kconfig
@@ -1,2 +1,3 @@
 config UNICORE32
     bool
+    select SEMIHOSTING
diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
index a3c8dc7f6d7..5e46049262d 100644
--- a/target/xtensa/Kconfig
+++ b/target/xtensa/Kconfig
@@ -1,2 +1,3 @@
 config XTENSA
     bool
+    select SEMIHOSTING
-- 
2.26.2



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

* [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
@ 2021-01-31 11:13   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 11:13 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Sarah Harris, Max Filippov, qemu-block, Michael S. Tsirkin,
	Eduardo Habkost, Laurent Vivier, Yoshinori Sato, qemu-s390x,
	Richard Henderson, Philippe Mathieu-Daudé,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

SEMIHOSTING is an architecture feature, move its declaration to
each target/ARCH/.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 default-configs/devices/lm32-softmmu.mak        | 2 --
 default-configs/devices/m68k-softmmu.mak        | 2 --
 default-configs/devices/mips-softmmu-common.mak | 3 ---
 default-configs/devices/nios2-softmmu.mak       | 2 --
 default-configs/devices/unicore32-softmmu.mak   | 1 -
 default-configs/devices/xtensa-softmmu.mak      | 2 --
 target/lm32/Kconfig                             | 1 +
 target/m68k/Kconfig                             | 1 +
 target/mips/Kconfig                             | 1 +
 target/nios2/Kconfig                            | 1 +
 target/unicore32/Kconfig                        | 1 +
 target/xtensa/Kconfig                           | 1 +
 12 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
index 1bce3f6e8b6..1f69795b749 100644
--- a/default-configs/devices/lm32-softmmu.mak
+++ b/default-configs/devices/lm32-softmmu.mak
@@ -4,8 +4,6 @@
 #
 #CONFIG_MILKYMIST_TMU2=n        # disabling it actually causes compile-time failures
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_LM32_EVR=y
diff --git a/default-configs/devices/m68k-softmmu.mak b/default-configs/devices/m68k-softmmu.mak
index 6629fd2aa33..4fef4bd731d 100644
--- a/default-configs/devices/m68k-softmmu.mak
+++ b/default-configs/devices/m68k-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for m68k-softmmu
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_AN5206=y
diff --git a/default-configs/devices/mips-softmmu-common.mak b/default-configs/devices/mips-softmmu-common.mak
index ea78fe72759..af652ec7bdd 100644
--- a/default-configs/devices/mips-softmmu-common.mak
+++ b/default-configs/devices/mips-softmmu-common.mak
@@ -1,8 +1,5 @@
 # Common mips*-softmmu CONFIG defines
 
-# CONFIG_SEMIHOSTING is always required on this architecture
-CONFIG_SEMIHOSTING=y
-
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
diff --git a/default-configs/devices/nios2-softmmu.mak b/default-configs/devices/nios2-softmmu.mak
index 1bc4082ea99..e130d024e62 100644
--- a/default-configs/devices/nios2-softmmu.mak
+++ b/default-configs/devices/nios2-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for nios2-softmmu
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_NIOS2_10M50=y
diff --git a/default-configs/devices/unicore32-softmmu.mak b/default-configs/devices/unicore32-softmmu.mak
index 899288e3d71..0bfce48c6da 100644
--- a/default-configs/devices/unicore32-softmmu.mak
+++ b/default-configs/devices/unicore32-softmmu.mak
@@ -3,4 +3,3 @@
 # Boards:
 #
 CONFIG_PUV3=y
-CONFIG_SEMIHOSTING=y
diff --git a/default-configs/devices/xtensa-softmmu.mak b/default-configs/devices/xtensa-softmmu.mak
index 4fe1bf00c94..49e4c9da88c 100644
--- a/default-configs/devices/xtensa-softmmu.mak
+++ b/default-configs/devices/xtensa-softmmu.mak
@@ -1,7 +1,5 @@
 # Default configuration for Xtensa
 
-CONFIG_SEMIHOSTING=y
-
 # Boards:
 #
 CONFIG_XTENSA_SIM=y
diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
index 09de5b703a3..286710fd47b 100644
--- a/target/lm32/Kconfig
+++ b/target/lm32/Kconfig
@@ -1,2 +1,3 @@
 config LM32
     bool
+    select SEMIHOSTING
diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
index 23debad519a..9eae71486ff 100644
--- a/target/m68k/Kconfig
+++ b/target/m68k/Kconfig
@@ -1,2 +1,3 @@
 config M68K
     bool
+    select SEMIHOSTING
diff --git a/target/mips/Kconfig b/target/mips/Kconfig
index 6adf1453548..eb19c94c7d4 100644
--- a/target/mips/Kconfig
+++ b/target/mips/Kconfig
@@ -1,5 +1,6 @@
 config MIPS
     bool
+    select SEMIHOSTING
 
 config MIPS64
     bool
diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
index 1529ab8950d..c65550c861a 100644
--- a/target/nios2/Kconfig
+++ b/target/nios2/Kconfig
@@ -1,2 +1,3 @@
 config NIOS2
     bool
+    select SEMIHOSTING
diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
index 62c9d10b38f..c699d5238ea 100644
--- a/target/unicore32/Kconfig
+++ b/target/unicore32/Kconfig
@@ -1,2 +1,3 @@
 config UNICORE32
     bool
+    select SEMIHOSTING
diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
index a3c8dc7f6d7..5e46049262d 100644
--- a/target/xtensa/Kconfig
+++ b/target/xtensa/Kconfig
@@ -1,2 +1,3 @@
 config XTENSA
     bool
+    select SEMIHOSTING
-- 
2.26.2



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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
  2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-01-31 11:40   ` Artyom Tarasenko
  2021-01-31 12:36   ` Philippe Mathieu-Daudé
  2021-02-01 11:23     ` Alex Bennée
  2 siblings, 0 replies; 42+ messages in thread
From: Artyom Tarasenko @ 2021-01-31 11:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Alex Bennée, Sarah Harris,
	Max Filippov, qemu-block, Michael S. Tsirkin, Eduardo Habkost,
	Laurent Vivier, Yoshinori Sato, qemu-s390x, Richard Henderson,
	Anthony Green, Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao,
	qemu-riscv, David Hildenbrand, qemu-arm, Marcel Apfelbaum,
	Mark Cave-Ayland, Michael Walle, Greg Kurz, qemu-ppc,
	Peter Maydell, Stafford Horne, Cornelia Huck, Marek Vasut,
	Aleksandar Rikalo, Sagar Karandikar, Bastian Koppelmann,
	Jiaxun Yang, Edgar E. Iglesias, Thomas Huth,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson

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

вс, 31 янв. 2021 г., 12:13 Philippe Mathieu-Daudé <f4bug@amsat.org>:

> Add a target-specific Kconfig.
>
> Target foo now has CONFIG_FOO defined.
>
> Two architecture have a particularity, ARM and MIPS:
> their 64-bit version include the 32-bit subset.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>

For SPARC part:
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>

---
> I suppose X86_64 should also select I386?
> No clue about PPC/RISCV.
> ---
>  meson.build               |  3 ++-
>  Kconfig                   |  1 +
>  target/Kconfig            | 23 +++++++++++++++++++++++
>  target/alpha/Kconfig      |  2 ++
>  target/arm/Kconfig        |  6 ++++++
>  target/avr/Kconfig        |  2 ++
>  target/cris/Kconfig       |  2 ++
>  target/hppa/Kconfig       |  2 ++
>  target/i386/Kconfig       |  5 +++++
>  target/lm32/Kconfig       |  2 ++
>  target/m68k/Kconfig       |  2 ++
>  target/microblaze/Kconfig |  2 ++
>  target/mips/Kconfig       |  6 ++++++
>  target/moxie/Kconfig      |  2 ++
>  target/nios2/Kconfig      |  2 ++
>  target/openrisc/Kconfig   |  2 ++
>  target/ppc/Kconfig        |  5 +++++
>  target/riscv/Kconfig      |  5 +++++
>  target/rx/Kconfig         |  2 ++
>  target/s390x/Kconfig      |  2 ++
>  target/sh4/Kconfig        |  2 ++
>  target/sparc/Kconfig      |  5 +++++
>  target/tilegx/Kconfig     |  2 ++
>  target/tricore/Kconfig    |  2 ++
>  target/unicore32/Kconfig  |  2 ++
>  target/xtensa/Kconfig     |  2 ++
>  26 files changed, 92 insertions(+), 1 deletion(-)
>  create mode 100644 target/Kconfig
>  create mode 100644 target/alpha/Kconfig
>  create mode 100644 target/arm/Kconfig
>  create mode 100644 target/avr/Kconfig
>  create mode 100644 target/cris/Kconfig
>  create mode 100644 target/hppa/Kconfig
>  create mode 100644 target/i386/Kconfig
>  create mode 100644 target/lm32/Kconfig
>  create mode 100644 target/m68k/Kconfig
>  create mode 100644 target/microblaze/Kconfig
>  create mode 100644 target/mips/Kconfig
>  create mode 100644 target/moxie/Kconfig
>  create mode 100644 target/nios2/Kconfig
>  create mode 100644 target/openrisc/Kconfig
>  create mode 100644 target/ppc/Kconfig
>  create mode 100644 target/riscv/Kconfig
>  create mode 100644 target/rx/Kconfig
>  create mode 100644 target/s390x/Kconfig
>  create mode 100644 target/sh4/Kconfig
>  create mode 100644 target/sparc/Kconfig
>  create mode 100644 target/tilegx/Kconfig
>  create mode 100644 target/tricore/Kconfig
>  create mode 100644 target/unicore32/Kconfig
>  create mode 100644 target/xtensa/Kconfig
>
> diff --git a/meson.build b/meson.build
> index f00b7754fd4..a2dda0ce95e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1322,7 +1322,8 @@
>        command: [minikconf,
>                  get_option('default_devices') ? '--defconfig' :
> '--allnoconfig',
>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
> -                host_kconfig, accel_kconfig])
> +                host_kconfig, accel_kconfig,
> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() +
> '=y'])
>
>      config_devices_data = configuration_data()
>      config_devices = keyval.load(config_devices_mak)
> diff --git a/Kconfig b/Kconfig
> index bf694c42afe..c01e261e4e9 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -1,4 +1,5 @@
>  source Kconfig.host
>  source backends/Kconfig
>  source accel/Kconfig
> +source target/Kconfig
>  source hw/Kconfig
> diff --git a/target/Kconfig b/target/Kconfig
> new file mode 100644
> index 00000000000..a6f719f223a
> --- /dev/null
> +++ b/target/Kconfig
> @@ -0,0 +1,23 @@
> +source alpha/Kconfig
> +source arm/Kconfig
> +source avr/Kconfig
> +source cris/Kconfig
> +source hppa/Kconfig
> +source i386/Kconfig
> +source lm32/Kconfig
> +source m68k/Kconfig
> +source microblaze/Kconfig
> +source mips/Kconfig
> +source moxie/Kconfig
> +source nios2/Kconfig
> +source openrisc/Kconfig
> +source ppc/Kconfig
> +source riscv/Kconfig
> +source rx/Kconfig
> +source s390x/Kconfig
> +source sh4/Kconfig
> +source sparc/Kconfig
> +source tilegx/Kconfig
> +source tricore/Kconfig
> +source unicore32/Kconfig
> +source xtensa/Kconfig
> diff --git a/target/alpha/Kconfig b/target/alpha/Kconfig
> new file mode 100644
> index 00000000000..267222c05b8
> --- /dev/null
> +++ b/target/alpha/Kconfig
> @@ -0,0 +1,2 @@
> +config ALPHA
> +    bool
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> new file mode 100644
> index 00000000000..3f3394a22b2
> --- /dev/null
> +++ b/target/arm/Kconfig
> @@ -0,0 +1,6 @@
> +config ARM
> +    bool
> +
> +config AARCH64
> +    bool
> +    select ARM
> diff --git a/target/avr/Kconfig b/target/avr/Kconfig
> new file mode 100644
> index 00000000000..155592d3537
> --- /dev/null
> +++ b/target/avr/Kconfig
> @@ -0,0 +1,2 @@
> +config AVR
> +    bool
> diff --git a/target/cris/Kconfig b/target/cris/Kconfig
> new file mode 100644
> index 00000000000..3fdc309fbbd
> --- /dev/null
> +++ b/target/cris/Kconfig
> @@ -0,0 +1,2 @@
> +config CRIS
> +    bool
> diff --git a/target/hppa/Kconfig b/target/hppa/Kconfig
> new file mode 100644
> index 00000000000..395a35d799c
> --- /dev/null
> +++ b/target/hppa/Kconfig
> @@ -0,0 +1,2 @@
> +config HPPA
> +    bool
> diff --git a/target/i386/Kconfig b/target/i386/Kconfig
> new file mode 100644
> index 00000000000..ce6968906ee
> --- /dev/null
> +++ b/target/i386/Kconfig
> @@ -0,0 +1,5 @@
> +config I386
> +    bool
> +
> +config X86_64
> +    bool
> diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
> new file mode 100644
> index 00000000000..09de5b703a3
> --- /dev/null
> +++ b/target/lm32/Kconfig
> @@ -0,0 +1,2 @@
> +config LM32
> +    bool
> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
> new file mode 100644
> index 00000000000..23debad519a
> --- /dev/null
> +++ b/target/m68k/Kconfig
> @@ -0,0 +1,2 @@
> +config M68K
> +    bool
> diff --git a/target/microblaze/Kconfig b/target/microblaze/Kconfig
> new file mode 100644
> index 00000000000..a5410d9218d
> --- /dev/null
> +++ b/target/microblaze/Kconfig
> @@ -0,0 +1,2 @@
> +config MICROBLAZE
> +    bool
> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
> new file mode 100644
> index 00000000000..6adf1453548
> --- /dev/null
> +++ b/target/mips/Kconfig
> @@ -0,0 +1,6 @@
> +config MIPS
> +    bool
> +
> +config MIPS64
> +    bool
> +    select MIPS
> diff --git a/target/moxie/Kconfig b/target/moxie/Kconfig
> new file mode 100644
> index 00000000000..52391bbd289
> --- /dev/null
> +++ b/target/moxie/Kconfig
> @@ -0,0 +1,2 @@
> +config MOXIE
> +    bool
> diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
> new file mode 100644
> index 00000000000..1529ab8950d
> --- /dev/null
> +++ b/target/nios2/Kconfig
> @@ -0,0 +1,2 @@
> +config NIOS2
> +    bool
> diff --git a/target/openrisc/Kconfig b/target/openrisc/Kconfig
> new file mode 100644
> index 00000000000..e0da4ac1dfc
> --- /dev/null
> +++ b/target/openrisc/Kconfig
> @@ -0,0 +1,2 @@
> +config OPENRISC
> +    bool
> diff --git a/target/ppc/Kconfig b/target/ppc/Kconfig
> new file mode 100644
> index 00000000000..3ff152051a3
> --- /dev/null
> +++ b/target/ppc/Kconfig
> @@ -0,0 +1,5 @@
> +config PPC
> +    bool
> +
> +config PPC64
> +    bool
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> new file mode 100644
> index 00000000000..b9e5932f13f
> --- /dev/null
> +++ b/target/riscv/Kconfig
> @@ -0,0 +1,5 @@
> +config RISCV32
> +    bool
> +
> +config RISCV64
> +    bool
> diff --git a/target/rx/Kconfig b/target/rx/Kconfig
> new file mode 100644
> index 00000000000..aceb5ed28fe
> --- /dev/null
> +++ b/target/rx/Kconfig
> @@ -0,0 +1,2 @@
> +config RX
> +    bool
> diff --git a/target/s390x/Kconfig b/target/s390x/Kconfig
> new file mode 100644
> index 00000000000..72da48136c6
> --- /dev/null
> +++ b/target/s390x/Kconfig
> @@ -0,0 +1,2 @@
> +config S390X
> +    bool
> diff --git a/target/sh4/Kconfig b/target/sh4/Kconfig
> new file mode 100644
> index 00000000000..2397c860280
> --- /dev/null
> +++ b/target/sh4/Kconfig
> @@ -0,0 +1,2 @@
> +config SH4
> +    bool
> diff --git a/target/sparc/Kconfig b/target/sparc/Kconfig
> new file mode 100644
> index 00000000000..70cc0f3a210
> --- /dev/null
> +++ b/target/sparc/Kconfig
> @@ -0,0 +1,5 @@
> +config SPARC
> +    bool
> +
> +config SPARC64
> +    bool
> diff --git a/target/tilegx/Kconfig b/target/tilegx/Kconfig
> new file mode 100644
> index 00000000000..aad882826ab
> --- /dev/null
> +++ b/target/tilegx/Kconfig
> @@ -0,0 +1,2 @@
> +config TILEGX
> +    bool
> diff --git a/target/tricore/Kconfig b/target/tricore/Kconfig
> new file mode 100644
> index 00000000000..93134093093
> --- /dev/null
> +++ b/target/tricore/Kconfig
> @@ -0,0 +1,2 @@
> +config TRICORE
> +    bool
> diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
> new file mode 100644
> index 00000000000..62c9d10b38f
> --- /dev/null
> +++ b/target/unicore32/Kconfig
> @@ -0,0 +1,2 @@
> +config UNICORE32
> +    bool
> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
> new file mode 100644
> index 00000000000..a3c8dc7f6d7
> --- /dev/null
> +++ b/target/xtensa/Kconfig
> @@ -0,0 +1,2 @@
> +config XTENSA
> +    bool
> --
> 2.26.2
>
>

[-- Attachment #2: Type: text/html, Size: 11265 bytes --]

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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
  2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
  2021-01-31 11:40   ` Artyom Tarasenko
@ 2021-01-31 12:36   ` Philippe Mathieu-Daudé
  2021-01-31 15:34       ` Philippe Mathieu-Daudé
  2021-02-01 11:23     ` Alex Bennée
  2 siblings, 1 reply; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 12:36 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, Thomas Huth,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Aurelien Jarno

On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote:
> Add a target-specific Kconfig.
> 
> Target foo now has CONFIG_FOO defined.
> 
> Two architecture have a particularity, ARM and MIPS:
> their 64-bit version include the 32-bit subset.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
...

> diff --git a/meson.build b/meson.build
> index f00b7754fd4..a2dda0ce95e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1322,7 +1322,8 @@
>        command: [minikconf,
>                  get_option('default_devices') ? '--defconfig' : '--allnoconfig',
>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
> -                host_kconfig, accel_kconfig])
> +                host_kconfig, accel_kconfig,
> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
>  
>      config_devices_data = configuration_data()
>      config_devices = keyval.load(config_devices_mak)
> diff --git a/Kconfig b/Kconfig
> index bf694c42afe..c01e261e4e9 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -1,4 +1,5 @@
>  source Kconfig.host
>  source backends/Kconfig
>  source accel/Kconfig
> +source target/Kconfig
>  source hw/Kconfig
> diff --git a/target/Kconfig b/target/Kconfig
> new file mode 100644
> index 00000000000..a6f719f223a
> --- /dev/null
> +++ b/target/Kconfig
> @@ -0,0 +1,23 @@
> +source alpha/Kconfig
> +source arm/Kconfig
> +source avr/Kconfig
> +source cris/Kconfig
> +source hppa/Kconfig
> +source i386/Kconfig
> +source lm32/Kconfig
> +source m68k/Kconfig
> +source microblaze/Kconfig
> +source mips/Kconfig
> +source moxie/Kconfig
> +source nios2/Kconfig
> +source openrisc/Kconfig
> +source ppc/Kconfig
> +source riscv/Kconfig
> +source rx/Kconfig
> +source s390x/Kconfig
> +source sh4/Kconfig
> +source sparc/Kconfig
> +source tilegx/Kconfig
> +source tricore/Kconfig
> +source unicore32/Kconfig
> +source xtensa/Kconfig
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> new file mode 100644
> index 00000000000..3f3394a22b2
> --- /dev/null
> +++ b/target/arm/Kconfig
> @@ -0,0 +1,6 @@
> +config ARM
> +    bool
> +
> +config AARCH64
> +    bool
> +    select ARM

This isn't correct yet, as Kconfig is primarly designed for devices,
and per docs/devel/kconfig.rst:

  "devices are usually ``default y`` if and only if they have at
   least one ``depends on``;"

So having one machine "depends on AARCH64" selects AARCH64 on ARM :/
I'll see if explicit each arch as 'default n' helps...


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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
  2021-01-31 12:36   ` Philippe Mathieu-Daudé
@ 2021-01-31 15:34       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 15:34 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, Thomas Huth,
	Max Filippov, Alistair Francis, Guan Xuetao, Marek Vasut,
	qemu-block, David Hildenbrand, Marc-André Lureau,
	Artyom Tarasenko, Aleksandar Rikalo, Eduardo Habkost,
	Richard Henderson, Greg Kurz, qemu-s390x, qemu-arm,
	Michael Rolnik, Stafford Horne, Palmer Dabbelt, David Gibson,
	Kevin Wolf, qemu-riscv, Yoshinori Sato, Bastian Koppelmann,
	Chris Wulff, Laurent Vivier, Max Reitz, Michael Walle, qemu-ppc,
	Aurelien Jarno

On 1/31/21 1:36 PM, Philippe Mathieu-Daudé wrote:
> On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote:
>> Add a target-specific Kconfig.
>>
>> Target foo now has CONFIG_FOO defined.
>>
>> Two architecture have a particularity, ARM and MIPS:
>> their 64-bit version include the 32-bit subset.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
> ...
> 
>> diff --git a/meson.build b/meson.build
>> index f00b7754fd4..a2dda0ce95e 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -1322,7 +1322,8 @@
>>        command: [minikconf,
>>                  get_option('default_devices') ? '--defconfig' : '--allnoconfig',
>>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
>> -                host_kconfig, accel_kconfig])
>> +                host_kconfig, accel_kconfig,
>> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
>>  
>>      config_devices_data = configuration_data()
>>      config_devices = keyval.load(config_devices_mak)
>> diff --git a/Kconfig b/Kconfig
>> index bf694c42afe..c01e261e4e9 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -1,4 +1,5 @@
>>  source Kconfig.host
>>  source backends/Kconfig
>>  source accel/Kconfig
>> +source target/Kconfig
>>  source hw/Kconfig
>> diff --git a/target/Kconfig b/target/Kconfig
>> new file mode 100644
>> index 00000000000..a6f719f223a
>> --- /dev/null
>> +++ b/target/Kconfig
>> @@ -0,0 +1,23 @@
>> +source alpha/Kconfig
>> +source arm/Kconfig
>> +source avr/Kconfig
>> +source cris/Kconfig
>> +source hppa/Kconfig
>> +source i386/Kconfig
>> +source lm32/Kconfig
>> +source m68k/Kconfig
>> +source microblaze/Kconfig
>> +source mips/Kconfig
>> +source moxie/Kconfig
>> +source nios2/Kconfig
>> +source openrisc/Kconfig
>> +source ppc/Kconfig
>> +source riscv/Kconfig
>> +source rx/Kconfig
>> +source s390x/Kconfig
>> +source sh4/Kconfig
>> +source sparc/Kconfig
>> +source tilegx/Kconfig
>> +source tricore/Kconfig
>> +source unicore32/Kconfig
>> +source xtensa/Kconfig
>> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
>> new file mode 100644
>> index 00000000000..3f3394a22b2
>> --- /dev/null
>> +++ b/target/arm/Kconfig
>> @@ -0,0 +1,6 @@
>> +config ARM
>> +    bool
>> +
>> +config AARCH64
>> +    bool
>> +    select ARM
> 
> This isn't correct yet, as Kconfig is primarly designed for devices,
> and per docs/devel/kconfig.rst:
> 
>   "devices are usually ``default y`` if and only if they have at
>    least one ``depends on``;"
> 
> So having one machine "depends on AARCH64" selects AARCH64 on ARM :/
> I'll see if explicit each arch as 'default n' helps...

Taking this comment back, the approach works but is fragile, as
an incorrect dependency can select the wrong arch and it is hard
to detect.


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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
@ 2021-01-31 15:34       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 42+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-31 15:34 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Alex Bennée
  Cc: Peter Maydell, Sarah Harris, Chris Wulff, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland,
	Aleksandar Rikalo, Max Filippov, Alistair Francis, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand,
	Marc-André Lureau, Artyom Tarasenko, Thomas Huth,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, qemu-ppc, Stafford Horne, David Gibson,
	Kevin Wolf, qemu-riscv, Yoshinori Sato, Bastian Koppelmann,
	Cornelia Huck, Laurent Vivier, Max Reitz, Michael Walle,
	Palmer Dabbelt, Aurelien Jarno

On 1/31/21 1:36 PM, Philippe Mathieu-Daudé wrote:
> On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote:
>> Add a target-specific Kconfig.
>>
>> Target foo now has CONFIG_FOO defined.
>>
>> Two architecture have a particularity, ARM and MIPS:
>> their 64-bit version include the 32-bit subset.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
> ...
> 
>> diff --git a/meson.build b/meson.build
>> index f00b7754fd4..a2dda0ce95e 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -1322,7 +1322,8 @@
>>        command: [minikconf,
>>                  get_option('default_devices') ? '--defconfig' : '--allnoconfig',
>>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
>> -                host_kconfig, accel_kconfig])
>> +                host_kconfig, accel_kconfig,
>> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
>>  
>>      config_devices_data = configuration_data()
>>      config_devices = keyval.load(config_devices_mak)
>> diff --git a/Kconfig b/Kconfig
>> index bf694c42afe..c01e261e4e9 100644
>> --- a/Kconfig
>> +++ b/Kconfig
>> @@ -1,4 +1,5 @@
>>  source Kconfig.host
>>  source backends/Kconfig
>>  source accel/Kconfig
>> +source target/Kconfig
>>  source hw/Kconfig
>> diff --git a/target/Kconfig b/target/Kconfig
>> new file mode 100644
>> index 00000000000..a6f719f223a
>> --- /dev/null
>> +++ b/target/Kconfig
>> @@ -0,0 +1,23 @@
>> +source alpha/Kconfig
>> +source arm/Kconfig
>> +source avr/Kconfig
>> +source cris/Kconfig
>> +source hppa/Kconfig
>> +source i386/Kconfig
>> +source lm32/Kconfig
>> +source m68k/Kconfig
>> +source microblaze/Kconfig
>> +source mips/Kconfig
>> +source moxie/Kconfig
>> +source nios2/Kconfig
>> +source openrisc/Kconfig
>> +source ppc/Kconfig
>> +source riscv/Kconfig
>> +source rx/Kconfig
>> +source s390x/Kconfig
>> +source sh4/Kconfig
>> +source sparc/Kconfig
>> +source tilegx/Kconfig
>> +source tricore/Kconfig
>> +source unicore32/Kconfig
>> +source xtensa/Kconfig
>> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
>> new file mode 100644
>> index 00000000000..3f3394a22b2
>> --- /dev/null
>> +++ b/target/arm/Kconfig
>> @@ -0,0 +1,6 @@
>> +config ARM
>> +    bool
>> +
>> +config AARCH64
>> +    bool
>> +    select ARM
> 
> This isn't correct yet, as Kconfig is primarly designed for devices,
> and per docs/devel/kconfig.rst:
> 
>   "devices are usually ``default y`` if and only if they have at
>    least one ``depends on``;"
> 
> So having one machine "depends on AARCH64" selects AARCH64 on ARM :/
> I'll see if explicit each arch as 'default n' helps...

Taking this comment back, the approach works but is fragile, as
an incorrect dependency can select the wrong arch and it is hard
to detect.


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

* Re: [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
  2021-01-31 11:13 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-02-01 10:24     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:24 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'SH4' config for architecture
> specific features. As CONFIG_SH4 is only used to select
> peripherals, rename it CONFIG_SH4_PERIPHERALS.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

I agree with Balaton Zoltan that _DEVICES might be a bit shorter. Either
way:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
@ 2021-02-01 10:24     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:24 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'SH4' config for architecture
> specific features. As CONFIG_SH4 is only used to select
> peripherals, rename it CONFIG_SH4_PERIPHERALS.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

I agree with Balaton Zoltan that _DEVICES might be a bit shorter. Either
way:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
  2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
@ 2021-02-01 10:28     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:28 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'LM32' config for architecture
> specific features. Introduce CONFIG_LM32_EVR to select the
> lm32-evr / lm32-uclinux boards.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
@ 2021-02-01 10:28     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:28 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'LM32' config for architecture
> specific features. Introduce CONFIG_LM32_EVR to select the
> lm32-evr / lm32-uclinux boards.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
  2021-01-31 11:13 ` [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-02-01 10:29     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'LM32' config for architecture
> specific features. As CONFIG_LM32 is only used to select
> peripherals, rename it CONFIG_LM32_PERIPHERALS.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

_DEVICES if you want, either way:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
@ 2021-02-01 10:29     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 10:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> We want to be able to use the 'LM32' config for architecture
> specific features. As CONFIG_LM32 is only used to select
> peripherals, rename it CONFIG_LM32_PERIPHERALS.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

_DEVICES if you want, either way:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
  2021-01-31 11:13 ` [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS Philippe Mathieu-Daudé
@ 2021-02-01 11:11     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> The Milkymist board requires more than the PTIMER. Directly
> select the LM32_PERIPHERALS. This fixes:
>
>   /usr/bin/ld:
>   libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register':
>   target/lm32/gdbstub.c:46: undefined reference to `lm32_pic_get_im'
>   target/lm32/gdbstub.c:48: undefined reference to `lm32_pic_get_ip'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_im':
>   target/lm32/op_helper.c:107: undefined reference to `lm32_pic_set_im'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_ip':
>   target/lm32/op_helper.c:114: undefined reference to `lm32_pic_set_ip'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jtx':
>   target/lm32/op_helper.c:120: undefined reference to `lm32_juart_set_jtx'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jrx':
>   target/lm32/op_helper.c:125: undefined reference to `lm32_juart_set_jrx'
>   libqemu-lm32-softmmu.fa.p/target_lm32_translate.c.o: in function `lm32_cpu_dump_state':
>   target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_ip'
>   target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_im'
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
@ 2021-02-01 11:11     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> The Milkymist board requires more than the PTIMER. Directly
> select the LM32_PERIPHERALS. This fixes:
>
>   /usr/bin/ld:
>   libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function `lm32_cpu_gdb_read_register':
>   target/lm32/gdbstub.c:46: undefined reference to `lm32_pic_get_im'
>   target/lm32/gdbstub.c:48: undefined reference to `lm32_pic_get_ip'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_im':
>   target/lm32/op_helper.c:107: undefined reference to `lm32_pic_set_im'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_ip':
>   target/lm32/op_helper.c:114: undefined reference to `lm32_pic_set_ip'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jtx':
>   target/lm32/op_helper.c:120: undefined reference to `lm32_juart_set_jtx'
>   libqemu-lm32-softmmu.fa.p/target_lm32_op_helper.c.o: in function `helper_wcsr_jrx':
>   target/lm32/op_helper.c:125: undefined reference to `lm32_juart_set_jrx'
>   libqemu-lm32-softmmu.fa.p/target_lm32_translate.c.o: in function `lm32_cpu_dump_state':
>   target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_ip'
>   target/lm32/translate.c:1161: undefined reference to `lm32_pic_get_im'
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 06/10] target/i386: Move SEV feature to target Kconfig
  2021-01-31 11:13 ` [PATCH 06/10] target/i386: Move SEV feature to target Kconfig Philippe Mathieu-Daudé
@ 2021-02-01 11:20     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:20 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> SEV is an architecture feature, move its declaration to target/i386/.

In docs/devel/kconfig.rst we make the distinction between:

  **subsystems**, of which **buses** are a special case
  **devices**
  **device groups**
  **boards**
  **internal elements**

Are we treating architecture features as internal elements or should we
add some additional words to the kconfig document before we starting to
move stuff there. In fact I realise this is better directed at 5/10 so
for this patch:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/i386/Kconfig     | 4 ----
>  target/i386/Kconfig | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 7f91f30877f..3d67c172dab 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -1,7 +1,3 @@
> -config SEV
> -    bool
> -    depends on KVM
> -
>  config PC
>      bool
>      imply APPLESMC
> diff --git a/target/i386/Kconfig b/target/i386/Kconfig
> index ce6968906ee..27c76c554c7 100644
> --- a/target/i386/Kconfig
> +++ b/target/i386/Kconfig
> @@ -3,3 +3,7 @@ config I386
>  
>  config X86_64
>      bool
> +
> +config SEV
> +    bool
> +    depends on KVM && I386


-- 
Alex Bennée


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

* Re: [PATCH 06/10] target/i386: Move SEV feature to target Kconfig
@ 2021-02-01 11:20     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:20 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> SEV is an architecture feature, move its declaration to target/i386/.

In docs/devel/kconfig.rst we make the distinction between:

  **subsystems**, of which **buses** are a special case
  **devices**
  **device groups**
  **boards**
  **internal elements**

Are we treating architecture features as internal elements or should we
add some additional words to the kconfig document before we starting to
move stuff there. In fact I realise this is better directed at 5/10 so
for this patch:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/i386/Kconfig     | 4 ----
>  target/i386/Kconfig | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 7f91f30877f..3d67c172dab 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -1,7 +1,3 @@
> -config SEV
> -    bool
> -    depends on KVM
> -
>  config PC
>      bool
>      imply APPLESMC
> diff --git a/target/i386/Kconfig b/target/i386/Kconfig
> index ce6968906ee..27c76c554c7 100644
> --- a/target/i386/Kconfig
> +++ b/target/i386/Kconfig
> @@ -3,3 +3,7 @@ config I386
>  
>  config X86_64
>      bool
> +
> +config SEV
> +    bool
> +    depends on KVM && I386


-- 
Alex Bennée


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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
  2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-02-01 11:23     ` Alex Bennée
  2021-01-31 12:36   ` Philippe Mathieu-Daudé
  2021-02-01 11:23     ` Alex Bennée
  2 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:23 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Add a target-specific Kconfig.
>
> Target foo now has CONFIG_FOO defined.
>
> Two architecture have a particularity, ARM and MIPS:
> their 64-bit version include the 32-bit subset.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> I suppose X86_64 should also select I386?
> No clue about PPC/RISCV.
> ---
>  meson.build               |  3 ++-
>  Kconfig                   |  1 +
>  target/Kconfig            | 23 +++++++++++++++++++++++
>  target/alpha/Kconfig      |  2 ++

Repeating myself through the magic of copy and paste:

In docs/devel/kconfig.rst we make the distinction between:

  **subsystems**, of which **buses** are a special case
  **devices**
  **device groups**
  **boards**
  **internal elements**

I think we need to document the target/* Kconfigs in kconfig.rst at the
same time as adding all of these.

>  target/arm/Kconfig        |  6 ++++++
>  target/avr/Kconfig        |  2 ++
>  target/cris/Kconfig       |  2 ++
>  target/hppa/Kconfig       |  2 ++
>  target/i386/Kconfig       |  5 +++++
>  target/lm32/Kconfig       |  2 ++
>  target/m68k/Kconfig       |  2 ++
>  target/microblaze/Kconfig |  2 ++
>  target/mips/Kconfig       |  6 ++++++
>  target/moxie/Kconfig      |  2 ++
>  target/nios2/Kconfig      |  2 ++
>  target/openrisc/Kconfig   |  2 ++
>  target/ppc/Kconfig        |  5 +++++
>  target/riscv/Kconfig      |  5 +++++
>  target/rx/Kconfig         |  2 ++
>  target/s390x/Kconfig      |  2 ++
>  target/sh4/Kconfig        |  2 ++
>  target/sparc/Kconfig      |  5 +++++
>  target/tilegx/Kconfig     |  2 ++
>  target/tricore/Kconfig    |  2 ++
>  target/unicore32/Kconfig  |  2 ++
>  target/xtensa/Kconfig     |  2 ++
>  26 files changed, 92 insertions(+), 1 deletion(-)
>  create mode 100644 target/Kconfig
>  create mode 100644 target/alpha/Kconfig
>  create mode 100644 target/arm/Kconfig
>  create mode 100644 target/avr/Kconfig
>  create mode 100644 target/cris/Kconfig
>  create mode 100644 target/hppa/Kconfig
>  create mode 100644 target/i386/Kconfig
>  create mode 100644 target/lm32/Kconfig
>  create mode 100644 target/m68k/Kconfig
>  create mode 100644 target/microblaze/Kconfig
>  create mode 100644 target/mips/Kconfig
>  create mode 100644 target/moxie/Kconfig
>  create mode 100644 target/nios2/Kconfig
>  create mode 100644 target/openrisc/Kconfig
>  create mode 100644 target/ppc/Kconfig
>  create mode 100644 target/riscv/Kconfig
>  create mode 100644 target/rx/Kconfig
>  create mode 100644 target/s390x/Kconfig
>  create mode 100644 target/sh4/Kconfig
>  create mode 100644 target/sparc/Kconfig
>  create mode 100644 target/tilegx/Kconfig
>  create mode 100644 target/tricore/Kconfig
>  create mode 100644 target/unicore32/Kconfig
>  create mode 100644 target/xtensa/Kconfig
>
> diff --git a/meson.build b/meson.build
> index f00b7754fd4..a2dda0ce95e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1322,7 +1322,8 @@
>        command: [minikconf,
>                  get_option('default_devices') ? '--defconfig' : '--allnoconfig',
>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
> -                host_kconfig, accel_kconfig])
> +                host_kconfig, accel_kconfig,
> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
>  
>      config_devices_data = configuration_data()
>      config_devices = keyval.load(config_devices_mak)
> diff --git a/Kconfig b/Kconfig
> index bf694c42afe..c01e261e4e9 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -1,4 +1,5 @@
>  source Kconfig.host
>  source backends/Kconfig
>  source accel/Kconfig
> +source target/Kconfig
>  source hw/Kconfig
> diff --git a/target/Kconfig b/target/Kconfig
> new file mode 100644
> index 00000000000..a6f719f223a
> --- /dev/null
> +++ b/target/Kconfig
> @@ -0,0 +1,23 @@
> +source alpha/Kconfig
> +source arm/Kconfig
> +source avr/Kconfig
> +source cris/Kconfig
> +source hppa/Kconfig
> +source i386/Kconfig
> +source lm32/Kconfig
> +source m68k/Kconfig
> +source microblaze/Kconfig
> +source mips/Kconfig
> +source moxie/Kconfig
> +source nios2/Kconfig
> +source openrisc/Kconfig
> +source ppc/Kconfig
> +source riscv/Kconfig
> +source rx/Kconfig
> +source s390x/Kconfig
> +source sh4/Kconfig
> +source sparc/Kconfig
> +source tilegx/Kconfig
> +source tricore/Kconfig
> +source unicore32/Kconfig
> +source xtensa/Kconfig
> diff --git a/target/alpha/Kconfig b/target/alpha/Kconfig
> new file mode 100644
> index 00000000000..267222c05b8
> --- /dev/null
> +++ b/target/alpha/Kconfig
> @@ -0,0 +1,2 @@
> +config ALPHA
> +    bool
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> new file mode 100644
> index 00000000000..3f3394a22b2
> --- /dev/null
> +++ b/target/arm/Kconfig
> @@ -0,0 +1,6 @@
> +config ARM
> +    bool
> +
> +config AARCH64
> +    bool
> +    select ARM
> diff --git a/target/avr/Kconfig b/target/avr/Kconfig
> new file mode 100644
> index 00000000000..155592d3537
> --- /dev/null
> +++ b/target/avr/Kconfig
> @@ -0,0 +1,2 @@
> +config AVR
> +    bool
> diff --git a/target/cris/Kconfig b/target/cris/Kconfig
> new file mode 100644
> index 00000000000..3fdc309fbbd
> --- /dev/null
> +++ b/target/cris/Kconfig
> @@ -0,0 +1,2 @@
> +config CRIS
> +    bool
> diff --git a/target/hppa/Kconfig b/target/hppa/Kconfig
> new file mode 100644
> index 00000000000..395a35d799c
> --- /dev/null
> +++ b/target/hppa/Kconfig
> @@ -0,0 +1,2 @@
> +config HPPA
> +    bool
> diff --git a/target/i386/Kconfig b/target/i386/Kconfig
> new file mode 100644
> index 00000000000..ce6968906ee
> --- /dev/null
> +++ b/target/i386/Kconfig
> @@ -0,0 +1,5 @@
> +config I386
> +    bool
> +
> +config X86_64
> +    bool
> diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
> new file mode 100644
> index 00000000000..09de5b703a3
> --- /dev/null
> +++ b/target/lm32/Kconfig
> @@ -0,0 +1,2 @@
> +config LM32
> +    bool
> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
> new file mode 100644
> index 00000000000..23debad519a
> --- /dev/null
> +++ b/target/m68k/Kconfig
> @@ -0,0 +1,2 @@
> +config M68K
> +    bool
> diff --git a/target/microblaze/Kconfig b/target/microblaze/Kconfig
> new file mode 100644
> index 00000000000..a5410d9218d
> --- /dev/null
> +++ b/target/microblaze/Kconfig
> @@ -0,0 +1,2 @@
> +config MICROBLAZE
> +    bool
> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
> new file mode 100644
> index 00000000000..6adf1453548
> --- /dev/null
> +++ b/target/mips/Kconfig
> @@ -0,0 +1,6 @@
> +config MIPS
> +    bool
> +
> +config MIPS64
> +    bool
> +    select MIPS
> diff --git a/target/moxie/Kconfig b/target/moxie/Kconfig
> new file mode 100644
> index 00000000000..52391bbd289
> --- /dev/null
> +++ b/target/moxie/Kconfig
> @@ -0,0 +1,2 @@
> +config MOXIE
> +    bool
> diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
> new file mode 100644
> index 00000000000..1529ab8950d
> --- /dev/null
> +++ b/target/nios2/Kconfig
> @@ -0,0 +1,2 @@
> +config NIOS2
> +    bool
> diff --git a/target/openrisc/Kconfig b/target/openrisc/Kconfig
> new file mode 100644
> index 00000000000..e0da4ac1dfc
> --- /dev/null
> +++ b/target/openrisc/Kconfig
> @@ -0,0 +1,2 @@
> +config OPENRISC
> +    bool
> diff --git a/target/ppc/Kconfig b/target/ppc/Kconfig
> new file mode 100644
> index 00000000000..3ff152051a3
> --- /dev/null
> +++ b/target/ppc/Kconfig
> @@ -0,0 +1,5 @@
> +config PPC
> +    bool
> +
> +config PPC64
> +    bool
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> new file mode 100644
> index 00000000000..b9e5932f13f
> --- /dev/null
> +++ b/target/riscv/Kconfig
> @@ -0,0 +1,5 @@
> +config RISCV32
> +    bool
> +
> +config RISCV64
> +    bool
> diff --git a/target/rx/Kconfig b/target/rx/Kconfig
> new file mode 100644
> index 00000000000..aceb5ed28fe
> --- /dev/null
> +++ b/target/rx/Kconfig
> @@ -0,0 +1,2 @@
> +config RX
> +    bool
> diff --git a/target/s390x/Kconfig b/target/s390x/Kconfig
> new file mode 100644
> index 00000000000..72da48136c6
> --- /dev/null
> +++ b/target/s390x/Kconfig
> @@ -0,0 +1,2 @@
> +config S390X
> +    bool
> diff --git a/target/sh4/Kconfig b/target/sh4/Kconfig
> new file mode 100644
> index 00000000000..2397c860280
> --- /dev/null
> +++ b/target/sh4/Kconfig
> @@ -0,0 +1,2 @@
> +config SH4
> +    bool
> diff --git a/target/sparc/Kconfig b/target/sparc/Kconfig
> new file mode 100644
> index 00000000000..70cc0f3a210
> --- /dev/null
> +++ b/target/sparc/Kconfig
> @@ -0,0 +1,5 @@
> +config SPARC
> +    bool
> +
> +config SPARC64
> +    bool
> diff --git a/target/tilegx/Kconfig b/target/tilegx/Kconfig
> new file mode 100644
> index 00000000000..aad882826ab
> --- /dev/null
> +++ b/target/tilegx/Kconfig
> @@ -0,0 +1,2 @@
> +config TILEGX
> +    bool
> diff --git a/target/tricore/Kconfig b/target/tricore/Kconfig
> new file mode 100644
> index 00000000000..93134093093
> --- /dev/null
> +++ b/target/tricore/Kconfig
> @@ -0,0 +1,2 @@
> +config TRICORE
> +    bool
> diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
> new file mode 100644
> index 00000000000..62c9d10b38f
> --- /dev/null
> +++ b/target/unicore32/Kconfig
> @@ -0,0 +1,2 @@
> +config UNICORE32
> +    bool
> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
> new file mode 100644
> index 00000000000..a3c8dc7f6d7
> --- /dev/null
> +++ b/target/xtensa/Kconfig
> @@ -0,0 +1,2 @@
> +config XTENSA
> +    bool


-- 
Alex Bennée


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

* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
@ 2021-02-01 11:23     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:23 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Add a target-specific Kconfig.
>
> Target foo now has CONFIG_FOO defined.
>
> Two architecture have a particularity, ARM and MIPS:
> their 64-bit version include the 32-bit subset.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> I suppose X86_64 should also select I386?
> No clue about PPC/RISCV.
> ---
>  meson.build               |  3 ++-
>  Kconfig                   |  1 +
>  target/Kconfig            | 23 +++++++++++++++++++++++
>  target/alpha/Kconfig      |  2 ++

Repeating myself through the magic of copy and paste:

In docs/devel/kconfig.rst we make the distinction between:

  **subsystems**, of which **buses** are a special case
  **devices**
  **device groups**
  **boards**
  **internal elements**

I think we need to document the target/* Kconfigs in kconfig.rst at the
same time as adding all of these.

>  target/arm/Kconfig        |  6 ++++++
>  target/avr/Kconfig        |  2 ++
>  target/cris/Kconfig       |  2 ++
>  target/hppa/Kconfig       |  2 ++
>  target/i386/Kconfig       |  5 +++++
>  target/lm32/Kconfig       |  2 ++
>  target/m68k/Kconfig       |  2 ++
>  target/microblaze/Kconfig |  2 ++
>  target/mips/Kconfig       |  6 ++++++
>  target/moxie/Kconfig      |  2 ++
>  target/nios2/Kconfig      |  2 ++
>  target/openrisc/Kconfig   |  2 ++
>  target/ppc/Kconfig        |  5 +++++
>  target/riscv/Kconfig      |  5 +++++
>  target/rx/Kconfig         |  2 ++
>  target/s390x/Kconfig      |  2 ++
>  target/sh4/Kconfig        |  2 ++
>  target/sparc/Kconfig      |  5 +++++
>  target/tilegx/Kconfig     |  2 ++
>  target/tricore/Kconfig    |  2 ++
>  target/unicore32/Kconfig  |  2 ++
>  target/xtensa/Kconfig     |  2 ++
>  26 files changed, 92 insertions(+), 1 deletion(-)
>  create mode 100644 target/Kconfig
>  create mode 100644 target/alpha/Kconfig
>  create mode 100644 target/arm/Kconfig
>  create mode 100644 target/avr/Kconfig
>  create mode 100644 target/cris/Kconfig
>  create mode 100644 target/hppa/Kconfig
>  create mode 100644 target/i386/Kconfig
>  create mode 100644 target/lm32/Kconfig
>  create mode 100644 target/m68k/Kconfig
>  create mode 100644 target/microblaze/Kconfig
>  create mode 100644 target/mips/Kconfig
>  create mode 100644 target/moxie/Kconfig
>  create mode 100644 target/nios2/Kconfig
>  create mode 100644 target/openrisc/Kconfig
>  create mode 100644 target/ppc/Kconfig
>  create mode 100644 target/riscv/Kconfig
>  create mode 100644 target/rx/Kconfig
>  create mode 100644 target/s390x/Kconfig
>  create mode 100644 target/sh4/Kconfig
>  create mode 100644 target/sparc/Kconfig
>  create mode 100644 target/tilegx/Kconfig
>  create mode 100644 target/tricore/Kconfig
>  create mode 100644 target/unicore32/Kconfig
>  create mode 100644 target/xtensa/Kconfig
>
> diff --git a/meson.build b/meson.build
> index f00b7754fd4..a2dda0ce95e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1322,7 +1322,8 @@
>        command: [minikconf,
>                  get_option('default_devices') ? '--defconfig' : '--allnoconfig',
>                  config_devices_mak, '@DEPFILE@', '@INPUT@',
> -                host_kconfig, accel_kconfig])
> +                host_kconfig, accel_kconfig,
> +                'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'])
>  
>      config_devices_data = configuration_data()
>      config_devices = keyval.load(config_devices_mak)
> diff --git a/Kconfig b/Kconfig
> index bf694c42afe..c01e261e4e9 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -1,4 +1,5 @@
>  source Kconfig.host
>  source backends/Kconfig
>  source accel/Kconfig
> +source target/Kconfig
>  source hw/Kconfig
> diff --git a/target/Kconfig b/target/Kconfig
> new file mode 100644
> index 00000000000..a6f719f223a
> --- /dev/null
> +++ b/target/Kconfig
> @@ -0,0 +1,23 @@
> +source alpha/Kconfig
> +source arm/Kconfig
> +source avr/Kconfig
> +source cris/Kconfig
> +source hppa/Kconfig
> +source i386/Kconfig
> +source lm32/Kconfig
> +source m68k/Kconfig
> +source microblaze/Kconfig
> +source mips/Kconfig
> +source moxie/Kconfig
> +source nios2/Kconfig
> +source openrisc/Kconfig
> +source ppc/Kconfig
> +source riscv/Kconfig
> +source rx/Kconfig
> +source s390x/Kconfig
> +source sh4/Kconfig
> +source sparc/Kconfig
> +source tilegx/Kconfig
> +source tricore/Kconfig
> +source unicore32/Kconfig
> +source xtensa/Kconfig
> diff --git a/target/alpha/Kconfig b/target/alpha/Kconfig
> new file mode 100644
> index 00000000000..267222c05b8
> --- /dev/null
> +++ b/target/alpha/Kconfig
> @@ -0,0 +1,2 @@
> +config ALPHA
> +    bool
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> new file mode 100644
> index 00000000000..3f3394a22b2
> --- /dev/null
> +++ b/target/arm/Kconfig
> @@ -0,0 +1,6 @@
> +config ARM
> +    bool
> +
> +config AARCH64
> +    bool
> +    select ARM
> diff --git a/target/avr/Kconfig b/target/avr/Kconfig
> new file mode 100644
> index 00000000000..155592d3537
> --- /dev/null
> +++ b/target/avr/Kconfig
> @@ -0,0 +1,2 @@
> +config AVR
> +    bool
> diff --git a/target/cris/Kconfig b/target/cris/Kconfig
> new file mode 100644
> index 00000000000..3fdc309fbbd
> --- /dev/null
> +++ b/target/cris/Kconfig
> @@ -0,0 +1,2 @@
> +config CRIS
> +    bool
> diff --git a/target/hppa/Kconfig b/target/hppa/Kconfig
> new file mode 100644
> index 00000000000..395a35d799c
> --- /dev/null
> +++ b/target/hppa/Kconfig
> @@ -0,0 +1,2 @@
> +config HPPA
> +    bool
> diff --git a/target/i386/Kconfig b/target/i386/Kconfig
> new file mode 100644
> index 00000000000..ce6968906ee
> --- /dev/null
> +++ b/target/i386/Kconfig
> @@ -0,0 +1,5 @@
> +config I386
> +    bool
> +
> +config X86_64
> +    bool
> diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
> new file mode 100644
> index 00000000000..09de5b703a3
> --- /dev/null
> +++ b/target/lm32/Kconfig
> @@ -0,0 +1,2 @@
> +config LM32
> +    bool
> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
> new file mode 100644
> index 00000000000..23debad519a
> --- /dev/null
> +++ b/target/m68k/Kconfig
> @@ -0,0 +1,2 @@
> +config M68K
> +    bool
> diff --git a/target/microblaze/Kconfig b/target/microblaze/Kconfig
> new file mode 100644
> index 00000000000..a5410d9218d
> --- /dev/null
> +++ b/target/microblaze/Kconfig
> @@ -0,0 +1,2 @@
> +config MICROBLAZE
> +    bool
> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
> new file mode 100644
> index 00000000000..6adf1453548
> --- /dev/null
> +++ b/target/mips/Kconfig
> @@ -0,0 +1,6 @@
> +config MIPS
> +    bool
> +
> +config MIPS64
> +    bool
> +    select MIPS
> diff --git a/target/moxie/Kconfig b/target/moxie/Kconfig
> new file mode 100644
> index 00000000000..52391bbd289
> --- /dev/null
> +++ b/target/moxie/Kconfig
> @@ -0,0 +1,2 @@
> +config MOXIE
> +    bool
> diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
> new file mode 100644
> index 00000000000..1529ab8950d
> --- /dev/null
> +++ b/target/nios2/Kconfig
> @@ -0,0 +1,2 @@
> +config NIOS2
> +    bool
> diff --git a/target/openrisc/Kconfig b/target/openrisc/Kconfig
> new file mode 100644
> index 00000000000..e0da4ac1dfc
> --- /dev/null
> +++ b/target/openrisc/Kconfig
> @@ -0,0 +1,2 @@
> +config OPENRISC
> +    bool
> diff --git a/target/ppc/Kconfig b/target/ppc/Kconfig
> new file mode 100644
> index 00000000000..3ff152051a3
> --- /dev/null
> +++ b/target/ppc/Kconfig
> @@ -0,0 +1,5 @@
> +config PPC
> +    bool
> +
> +config PPC64
> +    bool
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> new file mode 100644
> index 00000000000..b9e5932f13f
> --- /dev/null
> +++ b/target/riscv/Kconfig
> @@ -0,0 +1,5 @@
> +config RISCV32
> +    bool
> +
> +config RISCV64
> +    bool
> diff --git a/target/rx/Kconfig b/target/rx/Kconfig
> new file mode 100644
> index 00000000000..aceb5ed28fe
> --- /dev/null
> +++ b/target/rx/Kconfig
> @@ -0,0 +1,2 @@
> +config RX
> +    bool
> diff --git a/target/s390x/Kconfig b/target/s390x/Kconfig
> new file mode 100644
> index 00000000000..72da48136c6
> --- /dev/null
> +++ b/target/s390x/Kconfig
> @@ -0,0 +1,2 @@
> +config S390X
> +    bool
> diff --git a/target/sh4/Kconfig b/target/sh4/Kconfig
> new file mode 100644
> index 00000000000..2397c860280
> --- /dev/null
> +++ b/target/sh4/Kconfig
> @@ -0,0 +1,2 @@
> +config SH4
> +    bool
> diff --git a/target/sparc/Kconfig b/target/sparc/Kconfig
> new file mode 100644
> index 00000000000..70cc0f3a210
> --- /dev/null
> +++ b/target/sparc/Kconfig
> @@ -0,0 +1,5 @@
> +config SPARC
> +    bool
> +
> +config SPARC64
> +    bool
> diff --git a/target/tilegx/Kconfig b/target/tilegx/Kconfig
> new file mode 100644
> index 00000000000..aad882826ab
> --- /dev/null
> +++ b/target/tilegx/Kconfig
> @@ -0,0 +1,2 @@
> +config TILEGX
> +    bool
> diff --git a/target/tricore/Kconfig b/target/tricore/Kconfig
> new file mode 100644
> index 00000000000..93134093093
> --- /dev/null
> +++ b/target/tricore/Kconfig
> @@ -0,0 +1,2 @@
> +config TRICORE
> +    bool
> diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
> new file mode 100644
> index 00000000000..62c9d10b38f
> --- /dev/null
> +++ b/target/unicore32/Kconfig
> @@ -0,0 +1,2 @@
> +config UNICORE32
> +    bool
> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
> new file mode 100644
> index 00000000000..a3c8dc7f6d7
> --- /dev/null
> +++ b/target/xtensa/Kconfig
> @@ -0,0 +1,2 @@
> +config XTENSA
> +    bool


-- 
Alex Bennée


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

* Re: [PATCH 07/10] target/arm: Move V7M feature to target Kconfig
  2021-01-31 11:13 ` [PATCH 07/10] target/arm: Move V7M " Philippe Mathieu-Daudé
@ 2021-02-01 11:25     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:25 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> V7M is an architecture feature, move its declaration to target/arm/.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


modulo previous comments:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 07/10] target/arm: Move V7M feature to target Kconfig
@ 2021-02-01 11:25     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:25 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> V7M is an architecture feature, move its declaration to target/arm/.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


modulo previous comments:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
  2021-01-31 11:13 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Philippe Mathieu-Daudé
@ 2021-02-01 11:53     ` Alex Bennée
  2021-02-01 19:58     ` Alistair Francis
  1 sibling, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Commit 56b5170c87e ("semihosting: Move ARM semihosting code to
> shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which
> already selects SEMIHOSTING. No need to select it again.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
@ 2021-02-01 11:53     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Commit 56b5170c87e ("semihosting: Move ARM semihosting code to
> shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which
> already selects SEMIHOSTING. No need to select it again.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
  2021-01-31 11:13 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
@ 2021-02-01 11:54     ` Alex Bennée
  2021-02-01 19:59     ` Alistair Francis
  1 sibling, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its
> declaration to each target/ARCH/.
>
> Note, we do not modify the linux-user targets, as user-mode builds
> don't use Kconfig.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
@ 2021-02-01 11:54     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its
> declaration to each target/ARCH/.
>
> Note, we do not modify the linux-user targets, as user-mode builds
> don't use Kconfig.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


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

* Re: [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
  2021-01-31 11:13   ` Philippe Mathieu-Daudé
@ 2021-02-01 11:56     ` Alex Bennée
  -1 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, qemu-devel,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand, Thomas Huth,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Richard Henderson, Greg Kurz, qemu-s390x,
	qemu-arm, Michael Rolnik, Stafford Horne, Palmer Dabbelt,
	David Gibson, Kevin Wolf, qemu-riscv, Yoshinori Sato,
	Bastian Koppelmann, Chris Wulff, Laurent Vivier, Max Reitz,
	Michael Walle, qemu-ppc, Paolo Bonzini, Aurelien Jarno


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> SEMIHOSTING is an architecture feature, move its declaration to
> each target/ARCH/.

I'm going to punt on this one and leave it to the arch maintainers to
opine because AIUI in a lot of cases semihosting is more of a "useful
hack" than something mandated by the architecture.

>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  default-configs/devices/lm32-softmmu.mak        | 2 --
>  default-configs/devices/m68k-softmmu.mak        | 2 --
>  default-configs/devices/mips-softmmu-common.mak | 3 ---
>  default-configs/devices/nios2-softmmu.mak       | 2 --
>  default-configs/devices/unicore32-softmmu.mak   | 1 -
>  default-configs/devices/xtensa-softmmu.mak      | 2 --
>  target/lm32/Kconfig                             | 1 +
>  target/m68k/Kconfig                             | 1 +
>  target/mips/Kconfig                             | 1 +
>  target/nios2/Kconfig                            | 1 +
>  target/unicore32/Kconfig                        | 1 +
>  target/xtensa/Kconfig                           | 1 +
>  12 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
> index 1bce3f6e8b6..1f69795b749 100644
> --- a/default-configs/devices/lm32-softmmu.mak
> +++ b/default-configs/devices/lm32-softmmu.mak
> @@ -4,8 +4,6 @@
>  #
>  #CONFIG_MILKYMIST_TMU2=n        # disabling it actually causes compile-time failures
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_LM32_EVR=y
> diff --git a/default-configs/devices/m68k-softmmu.mak b/default-configs/devices/m68k-softmmu.mak
> index 6629fd2aa33..4fef4bd731d 100644
> --- a/default-configs/devices/m68k-softmmu.mak
> +++ b/default-configs/devices/m68k-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for m68k-softmmu
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_AN5206=y
> diff --git a/default-configs/devices/mips-softmmu-common.mak b/default-configs/devices/mips-softmmu-common.mak
> index ea78fe72759..af652ec7bdd 100644
> --- a/default-configs/devices/mips-softmmu-common.mak
> +++ b/default-configs/devices/mips-softmmu-common.mak
> @@ -1,8 +1,5 @@
>  # Common mips*-softmmu CONFIG defines
>  
> -# CONFIG_SEMIHOSTING is always required on this architecture
> -CONFIG_SEMIHOSTING=y
> -
>  CONFIG_ISA_BUS=y
>  CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
> diff --git a/default-configs/devices/nios2-softmmu.mak b/default-configs/devices/nios2-softmmu.mak
> index 1bc4082ea99..e130d024e62 100644
> --- a/default-configs/devices/nios2-softmmu.mak
> +++ b/default-configs/devices/nios2-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for nios2-softmmu
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_NIOS2_10M50=y
> diff --git a/default-configs/devices/unicore32-softmmu.mak b/default-configs/devices/unicore32-softmmu.mak
> index 899288e3d71..0bfce48c6da 100644
> --- a/default-configs/devices/unicore32-softmmu.mak
> +++ b/default-configs/devices/unicore32-softmmu.mak
> @@ -3,4 +3,3 @@
>  # Boards:
>  #
>  CONFIG_PUV3=y
> -CONFIG_SEMIHOSTING=y
> diff --git a/default-configs/devices/xtensa-softmmu.mak b/default-configs/devices/xtensa-softmmu.mak
> index 4fe1bf00c94..49e4c9da88c 100644
> --- a/default-configs/devices/xtensa-softmmu.mak
> +++ b/default-configs/devices/xtensa-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for Xtensa
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_XTENSA_SIM=y
> diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
> index 09de5b703a3..286710fd47b 100644
> --- a/target/lm32/Kconfig
> +++ b/target/lm32/Kconfig
> @@ -1,2 +1,3 @@
>  config LM32
>      bool
> +    select SEMIHOSTING
> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
> index 23debad519a..9eae71486ff 100644
> --- a/target/m68k/Kconfig
> +++ b/target/m68k/Kconfig
> @@ -1,2 +1,3 @@
>  config M68K
>      bool
> +    select SEMIHOSTING
> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
> index 6adf1453548..eb19c94c7d4 100644
> --- a/target/mips/Kconfig
> +++ b/target/mips/Kconfig
> @@ -1,5 +1,6 @@
>  config MIPS
>      bool
> +    select SEMIHOSTING
>  
>  config MIPS64
>      bool
> diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
> index 1529ab8950d..c65550c861a 100644
> --- a/target/nios2/Kconfig
> +++ b/target/nios2/Kconfig
> @@ -1,2 +1,3 @@
>  config NIOS2
>      bool
> +    select SEMIHOSTING
> diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
> index 62c9d10b38f..c699d5238ea 100644
> --- a/target/unicore32/Kconfig
> +++ b/target/unicore32/Kconfig
> @@ -1,2 +1,3 @@
>  config UNICORE32
>      bool
> +    select SEMIHOSTING
> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
> index a3c8dc7f6d7..5e46049262d 100644
> --- a/target/xtensa/Kconfig
> +++ b/target/xtensa/Kconfig
> @@ -1,2 +1,3 @@
>  config XTENSA
>      bool
> +    select SEMIHOSTING


-- 
Alex Bennée


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

* Re: [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
@ 2021-02-01 11:56     ` Alex Bennée
  0 siblings, 0 replies; 42+ messages in thread
From: Alex Bennée @ 2021-02-01 11:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Paolo Bonzini, Sarah Harris, Max Filippov,
	qemu-block, Michael S. Tsirkin, Eduardo Habkost, Laurent Vivier,
	Yoshinori Sato, qemu-s390x, Richard Henderson, Anthony Green,
	Kevin Wolf, Max Reitz, Chris Wulff, Guan Xuetao, qemu-riscv,
	David Hildenbrand, qemu-arm, Marcel Apfelbaum, Mark Cave-Ayland,
	Michael Walle, Greg Kurz, qemu-ppc, Peter Maydell,
	Stafford Horne, Cornelia Huck, Marek Vasut, Aleksandar Rikalo,
	Sagar Karandikar, Bastian Koppelmann, Jiaxun Yang,
	Edgar E. Iglesias, Thomas Huth, Artyom Tarasenko,
	Marc-André Lureau, Palmer Dabbelt, Michael Rolnik,
	Aurelien Jarno, Alistair Francis, David Gibson


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> SEMIHOSTING is an architecture feature, move its declaration to
> each target/ARCH/.

I'm going to punt on this one and leave it to the arch maintainers to
opine because AIUI in a lot of cases semihosting is more of a "useful
hack" than something mandated by the architecture.

>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  default-configs/devices/lm32-softmmu.mak        | 2 --
>  default-configs/devices/m68k-softmmu.mak        | 2 --
>  default-configs/devices/mips-softmmu-common.mak | 3 ---
>  default-configs/devices/nios2-softmmu.mak       | 2 --
>  default-configs/devices/unicore32-softmmu.mak   | 1 -
>  default-configs/devices/xtensa-softmmu.mak      | 2 --
>  target/lm32/Kconfig                             | 1 +
>  target/m68k/Kconfig                             | 1 +
>  target/mips/Kconfig                             | 1 +
>  target/nios2/Kconfig                            | 1 +
>  target/unicore32/Kconfig                        | 1 +
>  target/xtensa/Kconfig                           | 1 +
>  12 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
> index 1bce3f6e8b6..1f69795b749 100644
> --- a/default-configs/devices/lm32-softmmu.mak
> +++ b/default-configs/devices/lm32-softmmu.mak
> @@ -4,8 +4,6 @@
>  #
>  #CONFIG_MILKYMIST_TMU2=n        # disabling it actually causes compile-time failures
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_LM32_EVR=y
> diff --git a/default-configs/devices/m68k-softmmu.mak b/default-configs/devices/m68k-softmmu.mak
> index 6629fd2aa33..4fef4bd731d 100644
> --- a/default-configs/devices/m68k-softmmu.mak
> +++ b/default-configs/devices/m68k-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for m68k-softmmu
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_AN5206=y
> diff --git a/default-configs/devices/mips-softmmu-common.mak b/default-configs/devices/mips-softmmu-common.mak
> index ea78fe72759..af652ec7bdd 100644
> --- a/default-configs/devices/mips-softmmu-common.mak
> +++ b/default-configs/devices/mips-softmmu-common.mak
> @@ -1,8 +1,5 @@
>  # Common mips*-softmmu CONFIG defines
>  
> -# CONFIG_SEMIHOSTING is always required on this architecture
> -CONFIG_SEMIHOSTING=y
> -
>  CONFIG_ISA_BUS=y
>  CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
> diff --git a/default-configs/devices/nios2-softmmu.mak b/default-configs/devices/nios2-softmmu.mak
> index 1bc4082ea99..e130d024e62 100644
> --- a/default-configs/devices/nios2-softmmu.mak
> +++ b/default-configs/devices/nios2-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for nios2-softmmu
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_NIOS2_10M50=y
> diff --git a/default-configs/devices/unicore32-softmmu.mak b/default-configs/devices/unicore32-softmmu.mak
> index 899288e3d71..0bfce48c6da 100644
> --- a/default-configs/devices/unicore32-softmmu.mak
> +++ b/default-configs/devices/unicore32-softmmu.mak
> @@ -3,4 +3,3 @@
>  # Boards:
>  #
>  CONFIG_PUV3=y
> -CONFIG_SEMIHOSTING=y
> diff --git a/default-configs/devices/xtensa-softmmu.mak b/default-configs/devices/xtensa-softmmu.mak
> index 4fe1bf00c94..49e4c9da88c 100644
> --- a/default-configs/devices/xtensa-softmmu.mak
> +++ b/default-configs/devices/xtensa-softmmu.mak
> @@ -1,7 +1,5 @@
>  # Default configuration for Xtensa
>  
> -CONFIG_SEMIHOSTING=y
> -
>  # Boards:
>  #
>  CONFIG_XTENSA_SIM=y
> diff --git a/target/lm32/Kconfig b/target/lm32/Kconfig
> index 09de5b703a3..286710fd47b 100644
> --- a/target/lm32/Kconfig
> +++ b/target/lm32/Kconfig
> @@ -1,2 +1,3 @@
>  config LM32
>      bool
> +    select SEMIHOSTING
> diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig
> index 23debad519a..9eae71486ff 100644
> --- a/target/m68k/Kconfig
> +++ b/target/m68k/Kconfig
> @@ -1,2 +1,3 @@
>  config M68K
>      bool
> +    select SEMIHOSTING
> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
> index 6adf1453548..eb19c94c7d4 100644
> --- a/target/mips/Kconfig
> +++ b/target/mips/Kconfig
> @@ -1,5 +1,6 @@
>  config MIPS
>      bool
> +    select SEMIHOSTING
>  
>  config MIPS64
>      bool
> diff --git a/target/nios2/Kconfig b/target/nios2/Kconfig
> index 1529ab8950d..c65550c861a 100644
> --- a/target/nios2/Kconfig
> +++ b/target/nios2/Kconfig
> @@ -1,2 +1,3 @@
>  config NIOS2
>      bool
> +    select SEMIHOSTING
> diff --git a/target/unicore32/Kconfig b/target/unicore32/Kconfig
> index 62c9d10b38f..c699d5238ea 100644
> --- a/target/unicore32/Kconfig
> +++ b/target/unicore32/Kconfig
> @@ -1,2 +1,3 @@
>  config UNICORE32
>      bool
> +    select SEMIHOSTING
> diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig
> index a3c8dc7f6d7..5e46049262d 100644
> --- a/target/xtensa/Kconfig
> +++ b/target/xtensa/Kconfig
> @@ -1,2 +1,3 @@
>  config XTENSA
>      bool
> +    select SEMIHOSTING


-- 
Alex Bennée


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

* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
  2021-01-31 11:13 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Philippe Mathieu-Daudé
@ 2021-02-01 19:58     ` Alistair Francis
  2021-02-01 19:58     ` Alistair Francis
  1 sibling, 0 replies; 42+ messages in thread
From: Alistair Francis @ 2021-02-01 19:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Chris Wulff, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland,
	qemu-devel@nongnu.org Developers, Max Filippov, Alistair Francis,
	Edgar E. Iglesias, Guan Xuetao, Marek Vasut, Qemu-block,
	David Hildenbrand, Thomas Huth, Marc-André Lureau,
	Artyom Tarasenko, Aleksandar Rikalo, Eduardo Habkost,
	Richard Henderson, Greg Kurz, qemu-s390x, qemu-arm,
	Michael Rolnik, open list:New World, Stafford Horne,
	Alex Bennée, David Gibson, Kevin Wolf, open list:RISC-V,
	Yoshinori Sato, Bastian Koppelmann, Cornelia Huck,
	Laurent Vivier, Max Reitz, Michael Walle, Palmer Dabbelt,
	Paolo Bonzini, Aurelien Jarno

On Sun, Jan 31, 2021 at 3:24 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Commit 56b5170c87e ("semihosting: Move ARM semihosting code to
> shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which
> already selects SEMIHOSTING. No need to select it again.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  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(-)
>
> diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
> index 0500156a0c7..341d439de6f 100644
> --- a/default-configs/devices/arm-softmmu.mak
> +++ b/default-configs/devices/arm-softmmu.mak
> @@ -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
> diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
> index d847bd5692e..5c9ad2590ef 100644
> --- a/default-configs/devices/riscv32-softmmu.mak
> +++ b/default-configs/devices/riscv32-softmmu.mak
> @@ -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:
> diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
> index d5eec75f05e..d5b2e25b6df 100644
> --- a/default-configs/devices/riscv64-softmmu.mak
> +++ b/default-configs/devices/riscv64-softmmu.mak
> @@ -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:
> --
> 2.26.2
>
>


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

* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
@ 2021-02-01 19:58     ` Alistair Francis
  0 siblings, 0 replies; 42+ messages in thread
From: Alistair Francis @ 2021-02-01 19:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel@nongnu.org Developers, Paolo Bonzini,
	Alex Bennée, Peter Maydell, Sarah Harris, Cornelia Huck,
	Sagar Karandikar, Michael S. Tsirkin, Anthony Green,
	Mark Cave-Ayland, Thomas Huth, Max Filippov, Alistair Francis,
	Edgar E. Iglesias, Guan Xuetao, Marek Vasut, Qemu-block,
	David Hildenbrand, Marc-André Lureau, Artyom Tarasenko,
	Aleksandar Rikalo, Eduardo Habkost, Richard Henderson, Greg Kurz,
	qemu-s390x, qemu-arm, Michael Rolnik, Stafford Horne,
	Palmer Dabbelt, David Gibson, Kevin Wolf, open list:RISC-V,
	Yoshinori Sato, Bastian Koppelmann, Chris Wulff, Laurent Vivier,
	Max Reitz, Michael Walle, open list:New World, Aurelien Jarno

On Sun, Jan 31, 2021 at 3:24 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Commit 56b5170c87e ("semihosting: Move ARM semihosting code to
> shared directories") selected ARM_COMPATIBLE_SEMIHOSTING which
> already selects SEMIHOSTING. No need to select it again.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  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(-)
>
> diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
> index 0500156a0c7..341d439de6f 100644
> --- a/default-configs/devices/arm-softmmu.mak
> +++ b/default-configs/devices/arm-softmmu.mak
> @@ -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
> diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
> index d847bd5692e..5c9ad2590ef 100644
> --- a/default-configs/devices/riscv32-softmmu.mak
> +++ b/default-configs/devices/riscv32-softmmu.mak
> @@ -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:
> diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
> index d5eec75f05e..d5b2e25b6df 100644
> --- a/default-configs/devices/riscv64-softmmu.mak
> +++ b/default-configs/devices/riscv64-softmmu.mak
> @@ -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:
> --
> 2.26.2
>
>


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

* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
  2021-01-31 11:13 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
@ 2021-02-01 19:59     ` Alistair Francis
  2021-02-01 19:59     ` Alistair Francis
  1 sibling, 0 replies; 42+ messages in thread
From: Alistair Francis @ 2021-02-01 19:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Sarah Harris, Chris Wulff, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland,
	qemu-devel@nongnu.org Developers, Max Filippov, Alistair Francis,
	Edgar E. Iglesias, Guan Xuetao, Marek Vasut, Qemu-block,
	David Hildenbrand, Thomas Huth, Marc-André Lureau,
	Artyom Tarasenko, Aleksandar Rikalo, Eduardo Habkost,
	Richard Henderson, Greg Kurz, qemu-s390x, qemu-arm,
	Michael Rolnik, open list:New World, Stafford Horne,
	Alex Bennée, David Gibson, Kevin Wolf, open list:RISC-V,
	Yoshinori Sato, Bastian Koppelmann, Cornelia Huck,
	Laurent Vivier, Max Reitz, Michael Walle, Palmer Dabbelt,
	Paolo Bonzini, Aurelien Jarno

On Sun, Jan 31, 2021 at 3:14 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its
> declaration to each target/ARCH/.
>
> Note, we do not modify the linux-user targets, as user-mode builds
> don't use Kconfig.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  default-configs/devices/arm-softmmu.mak     | 1 -
>  default-configs/devices/riscv32-softmmu.mak | 1 -
>  default-configs/devices/riscv64-softmmu.mak | 1 -
>  target/arm/Kconfig                          | 1 +
>  target/riscv/Kconfig                        | 2 ++
>  5 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
> index 341d439de6f..0824e9be795 100644
> --- a/default-configs/devices/arm-softmmu.mak
> +++ b/default-configs/devices/arm-softmmu.mak
> @@ -41,5 +41,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
> diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
> index 5c9ad2590ef..94a236c9c25 100644
> --- a/default-configs/devices/riscv32-softmmu.mak
> +++ b/default-configs/devices/riscv32-softmmu.mak
> @@ -3,7 +3,6 @@
>  # Uncomment the following lines to disable these optional devices:
>  #
>  #CONFIG_PCI_DEVICES=n
> -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
>
>  # Boards:
>  #
> diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
> index d5b2e25b6df..76b61956489 100644
> --- a/default-configs/devices/riscv64-softmmu.mak
> +++ b/default-configs/devices/riscv64-softmmu.mak
> @@ -3,7 +3,6 @@
>  # Uncomment the following lines to disable these optional devices:
>  #
>  #CONFIG_PCI_DEVICES=n
> -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
>
>  # Boards:
>  #
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> index 1f05de47ca6..ae89d05c7e5 100644
> --- a/target/arm/Kconfig
> +++ b/target/arm/Kconfig
> @@ -1,5 +1,6 @@
>  config ARM
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
>
>  config AARCH64
>      bool
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> index b9e5932f13f..c3b9d8a1cf1 100644
> --- a/target/riscv/Kconfig
> +++ b/target/riscv/Kconfig
> @@ -1,5 +1,7 @@
>  config RISCV32
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
>
>  config RISCV64
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
> --
> 2.26.2
>
>


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

* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
@ 2021-02-01 19:59     ` Alistair Francis
  0 siblings, 0 replies; 42+ messages in thread
From: Alistair Francis @ 2021-02-01 19:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel@nongnu.org Developers, Paolo Bonzini,
	Alex Bennée, Peter Maydell, Sarah Harris, Cornelia Huck,
	Sagar Karandikar, Michael S. Tsirkin, Anthony Green,
	Mark Cave-Ayland, Thomas Huth, Max Filippov, Alistair Francis,
	Edgar E. Iglesias, Guan Xuetao, Marek Vasut, Qemu-block,
	David Hildenbrand, Marc-André Lureau, Artyom Tarasenko,
	Aleksandar Rikalo, Eduardo Habkost, Richard Henderson, Greg Kurz,
	qemu-s390x, qemu-arm, Michael Rolnik, Stafford Horne,
	Palmer Dabbelt, David Gibson, Kevin Wolf, open list:RISC-V,
	Yoshinori Sato, Bastian Koppelmann, Chris Wulff, Laurent Vivier,
	Max Reitz, Michael Walle, open list:New World, Aurelien Jarno

On Sun, Jan 31, 2021 at 3:14 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> ARM_COMPATIBLE_SEMIHOSTING is an architecture feature, move its
> declaration to each target/ARCH/.
>
> Note, we do not modify the linux-user targets, as user-mode builds
> don't use Kconfig.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  default-configs/devices/arm-softmmu.mak     | 1 -
>  default-configs/devices/riscv32-softmmu.mak | 1 -
>  default-configs/devices/riscv64-softmmu.mak | 1 -
>  target/arm/Kconfig                          | 1 +
>  target/riscv/Kconfig                        | 2 ++
>  5 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak
> index 341d439de6f..0824e9be795 100644
> --- a/default-configs/devices/arm-softmmu.mak
> +++ b/default-configs/devices/arm-softmmu.mak
> @@ -41,5 +41,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
> diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak
> index 5c9ad2590ef..94a236c9c25 100644
> --- a/default-configs/devices/riscv32-softmmu.mak
> +++ b/default-configs/devices/riscv32-softmmu.mak
> @@ -3,7 +3,6 @@
>  # Uncomment the following lines to disable these optional devices:
>  #
>  #CONFIG_PCI_DEVICES=n
> -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
>
>  # Boards:
>  #
> diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak
> index d5b2e25b6df..76b61956489 100644
> --- a/default-configs/devices/riscv64-softmmu.mak
> +++ b/default-configs/devices/riscv64-softmmu.mak
> @@ -3,7 +3,6 @@
>  # Uncomment the following lines to disable these optional devices:
>  #
>  #CONFIG_PCI_DEVICES=n
> -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y
>
>  # Boards:
>  #
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> index 1f05de47ca6..ae89d05c7e5 100644
> --- a/target/arm/Kconfig
> +++ b/target/arm/Kconfig
> @@ -1,5 +1,6 @@
>  config ARM
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
>
>  config AARCH64
>      bool
> diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
> index b9e5932f13f..c3b9d8a1cf1 100644
> --- a/target/riscv/Kconfig
> +++ b/target/riscv/Kconfig
> @@ -1,5 +1,7 @@
>  config RISCV32
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
>
>  config RISCV64
>      bool
> +    select ARM_COMPATIBLE_SEMIHOSTING
> --
> 2.26.2
>
>


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

* Re: [PATCH 00/10] target: Provide target-specific Kconfig
  2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
@ 2021-03-10 13:30   ` Claudio Fontana
  2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
                     ` (9 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Claudio Fontana @ 2021-03-10 13:30 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	qemu-devel, Alex Bennée, Peter Maydell, Richard Henderson
  Cc: qemu-ppc, Sarah Harris, Chris Wulff, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland,
	Aleksandar Rikalo, Max Filippov, Alistair Francis,
	Edgar E. Iglesias, Guan Xuetao, Marek Vasut, qemu-block,
	David Hildenbrand, Marc-André Lureau, Artyom Tarasenko,
	Thomas Huth, Eduardo Habkost, Greg Kurz, qemu-s390x, qemu-arm,
	Michael Rolnik, Stafford Horne, David Gibson, Kevin Wolf,
	qemu-riscv, Yoshinori Sato, Bastian Koppelmann, Cornelia Huck,
	Laurent Vivier, Max Reitz, Michael Walle, Palmer Dabbelt,
	Paolo Bonzini, Aurelien Jarno

Hi all, where are we with this series?

I am trying to figure out how to apply the whole thing,
in order to build only compatible ARM boards and devices for KVM-only builds.

Ie, I would like to combine this with:

"arm cleanup experiment for kvm-only build"

https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg02790.html

My series there gets us to a buildable and working KVM-only ARM target, with all make check tests passing.

However, in order to be able to remove more code, remove stubs etc,
I found the presence of incompatible ARM boards and devices as blocking additional cleanups.

Therefore, in order to proceed with additional cleanup in arm, and adding the accel-specific extensions to the cpu class,
I see being able to disable incompatible boards for KVM as necessary.

IIUC there are:

* This series "target: Provide target-specific Kconfig"
* Support disabling TCG on ARM ?
* Support disabling TCG on ARM (part 2) ?

What is the current state here?

Thanks,

Claudio


On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> This series add a Kconfig file to each target, allowing
> to select target-specific features there, instead of from
> the hardware Kconfig.
> 
> This simplifies managing multi-arch features such semihosting.
> 
> Series organization:
> 
> 1/ Some targets use the architecture symbol to select boards and
> peripherals (SH4 and LM32), we need to clean that first.
> 
> 2/ Introduce empty target Kconfig, update meson.
> 
> 3/ Move architectural features out of hardware:
>    - x86 SEV
>    - ARM v7m
>    - generic semihosting
> 
> [following only important to patchew, unrelated to this series]
> Based-on: <20210131105918.228787-1-f4bug@amsat.org>
> 
> Philippe Mathieu-Daudé (10):
>   hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
>   hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
>   hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
>   hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
>   meson: Introduce target-specific Kconfig
>   target/i386: Move SEV feature to target Kconfig
>   target/arm: Move V7M feature to target Kconfig
>   default-configs: Remove unnecessary SEMIHOSTING selection
>   target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
>   target: Move SEMIHOSTING feature to target Kconfig
> 
>  default-configs/devices/arm-softmmu.mak       |  2 --
>  default-configs/devices/lm32-softmmu.mak      |  4 +---
>  default-configs/devices/m68k-softmmu.mak      |  2 --
>  .../devices/mips-softmmu-common.mak           |  3 ---
>  default-configs/devices/nios2-softmmu.mak     |  2 --
>  default-configs/devices/riscv32-softmmu.mak   |  2 --
>  default-configs/devices/riscv64-softmmu.mak   |  2 --
>  default-configs/devices/unicore32-softmmu.mak |  1 -
>  default-configs/devices/xtensa-softmmu.mak    |  2 --
>  meson.build                                   |  3 ++-
>  Kconfig                                       |  1 +
>  hw/arm/Kconfig                                |  4 ----
>  hw/block/meson.build                          |  2 +-
>  hw/char/meson.build                           |  6 ++---
>  hw/i386/Kconfig                               |  4 ----
>  hw/intc/meson.build                           |  4 ++--
>  hw/lm32/Kconfig                               | 10 +++++---
>  hw/lm32/meson.build                           |  2 +-
>  hw/sh4/Kconfig                                |  6 ++---
>  hw/timer/meson.build                          |  4 ++--
>  target/Kconfig                                | 23 +++++++++++++++++++
>  target/alpha/Kconfig                          |  2 ++
>  target/arm/Kconfig                            | 11 +++++++++
>  target/avr/Kconfig                            |  2 ++
>  target/cris/Kconfig                           |  2 ++
>  target/hppa/Kconfig                           |  2 ++
>  target/i386/Kconfig                           |  9 ++++++++
>  target/lm32/Kconfig                           |  3 +++
>  target/m68k/Kconfig                           |  3 +++
>  target/microblaze/Kconfig                     |  2 ++
>  target/mips/Kconfig                           |  7 ++++++
>  target/moxie/Kconfig                          |  2 ++
>  target/nios2/Kconfig                          |  3 +++
>  target/openrisc/Kconfig                       |  2 ++
>  target/ppc/Kconfig                            |  5 ++++
>  target/riscv/Kconfig                          |  7 ++++++
>  target/rx/Kconfig                             |  2 ++
>  target/s390x/Kconfig                          |  2 ++
>  target/sh4/Kconfig                            |  2 ++
>  target/sparc/Kconfig                          |  5 ++++
>  target/tilegx/Kconfig                         |  2 ++
>  target/tricore/Kconfig                        |  2 ++
>  target/unicore32/Kconfig                      |  3 +++
>  target/xtensa/Kconfig                         |  3 +++
>  44 files changed, 129 insertions(+), 43 deletions(-)
>  create mode 100644 target/Kconfig
>  create mode 100644 target/alpha/Kconfig
>  create mode 100644 target/arm/Kconfig
>  create mode 100644 target/avr/Kconfig
>  create mode 100644 target/cris/Kconfig
>  create mode 100644 target/hppa/Kconfig
>  create mode 100644 target/i386/Kconfig
>  create mode 100644 target/lm32/Kconfig
>  create mode 100644 target/m68k/Kconfig
>  create mode 100644 target/microblaze/Kconfig
>  create mode 100644 target/mips/Kconfig
>  create mode 100644 target/moxie/Kconfig
>  create mode 100644 target/nios2/Kconfig
>  create mode 100644 target/openrisc/Kconfig
>  create mode 100644 target/ppc/Kconfig
>  create mode 100644 target/riscv/Kconfig
>  create mode 100644 target/rx/Kconfig
>  create mode 100644 target/s390x/Kconfig
>  create mode 100644 target/sh4/Kconfig
>  create mode 100644 target/sparc/Kconfig
>  create mode 100644 target/tilegx/Kconfig
>  create mode 100644 target/tricore/Kconfig
>  create mode 100644 target/unicore32/Kconfig
>  create mode 100644 target/xtensa/Kconfig
> 



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

* Re: [PATCH 00/10] target: Provide target-specific Kconfig
@ 2021-03-10 13:30   ` Claudio Fontana
  0 siblings, 0 replies; 42+ messages in thread
From: Claudio Fontana @ 2021-03-10 13:30 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	qemu-devel, Alex Bennée, Peter Maydell, Richard Henderson
  Cc: Paolo Bonzini, Sarah Harris, Cornelia Huck, Sagar Karandikar,
	Michael S. Tsirkin, Anthony Green, Mark Cave-Ayland, Thomas Huth,
	Max Filippov, Alistair Francis, Edgar E. Iglesias, Guan Xuetao,
	Marek Vasut, qemu-block, David Hildenbrand,
	Marc-André Lureau, Artyom Tarasenko, Aleksandar Rikalo,
	Eduardo Habkost, Greg Kurz, qemu-s390x, qemu-arm, Michael Rolnik,
	Stafford Horne, Palmer Dabbelt, David Gibson, Kevin Wolf,
	qemu-riscv, Yoshinori Sato, Bastian Koppelmann, Chris Wulff,
	Laurent Vivier, Max Reitz, Michael Walle, qemu-ppc,
	Aurelien Jarno

Hi all, where are we with this series?

I am trying to figure out how to apply the whole thing,
in order to build only compatible ARM boards and devices for KVM-only builds.

Ie, I would like to combine this with:

"arm cleanup experiment for kvm-only build"

https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg02790.html

My series there gets us to a buildable and working KVM-only ARM target, with all make check tests passing.

However, in order to be able to remove more code, remove stubs etc,
I found the presence of incompatible ARM boards and devices as blocking additional cleanups.

Therefore, in order to proceed with additional cleanup in arm, and adding the accel-specific extensions to the cpu class,
I see being able to disable incompatible boards for KVM as necessary.

IIUC there are:

* This series "target: Provide target-specific Kconfig"
* Support disabling TCG on ARM ?
* Support disabling TCG on ARM (part 2) ?

What is the current state here?

Thanks,

Claudio


On 1/31/21 12:13 PM, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> This series add a Kconfig file to each target, allowing
> to select target-specific features there, instead of from
> the hardware Kconfig.
> 
> This simplifies managing multi-arch features such semihosting.
> 
> Series organization:
> 
> 1/ Some targets use the architecture symbol to select boards and
> peripherals (SH4 and LM32), we need to clean that first.
> 
> 2/ Introduce empty target Kconfig, update meson.
> 
> 3/ Move architectural features out of hardware:
>    - x86 SEV
>    - ARM v7m
>    - generic semihosting
> 
> [following only important to patchew, unrelated to this series]
> Based-on: <20210131105918.228787-1-f4bug@amsat.org>
> 
> Philippe Mathieu-Daudé (10):
>   hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
>   hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
>   hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
>   hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
>   meson: Introduce target-specific Kconfig
>   target/i386: Move SEV feature to target Kconfig
>   target/arm: Move V7M feature to target Kconfig
>   default-configs: Remove unnecessary SEMIHOSTING selection
>   target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
>   target: Move SEMIHOSTING feature to target Kconfig
> 
>  default-configs/devices/arm-softmmu.mak       |  2 --
>  default-configs/devices/lm32-softmmu.mak      |  4 +---
>  default-configs/devices/m68k-softmmu.mak      |  2 --
>  .../devices/mips-softmmu-common.mak           |  3 ---
>  default-configs/devices/nios2-softmmu.mak     |  2 --
>  default-configs/devices/riscv32-softmmu.mak   |  2 --
>  default-configs/devices/riscv64-softmmu.mak   |  2 --
>  default-configs/devices/unicore32-softmmu.mak |  1 -
>  default-configs/devices/xtensa-softmmu.mak    |  2 --
>  meson.build                                   |  3 ++-
>  Kconfig                                       |  1 +
>  hw/arm/Kconfig                                |  4 ----
>  hw/block/meson.build                          |  2 +-
>  hw/char/meson.build                           |  6 ++---
>  hw/i386/Kconfig                               |  4 ----
>  hw/intc/meson.build                           |  4 ++--
>  hw/lm32/Kconfig                               | 10 +++++---
>  hw/lm32/meson.build                           |  2 +-
>  hw/sh4/Kconfig                                |  6 ++---
>  hw/timer/meson.build                          |  4 ++--
>  target/Kconfig                                | 23 +++++++++++++++++++
>  target/alpha/Kconfig                          |  2 ++
>  target/arm/Kconfig                            | 11 +++++++++
>  target/avr/Kconfig                            |  2 ++
>  target/cris/Kconfig                           |  2 ++
>  target/hppa/Kconfig                           |  2 ++
>  target/i386/Kconfig                           |  9 ++++++++
>  target/lm32/Kconfig                           |  3 +++
>  target/m68k/Kconfig                           |  3 +++
>  target/microblaze/Kconfig                     |  2 ++
>  target/mips/Kconfig                           |  7 ++++++
>  target/moxie/Kconfig                          |  2 ++
>  target/nios2/Kconfig                          |  3 +++
>  target/openrisc/Kconfig                       |  2 ++
>  target/ppc/Kconfig                            |  5 ++++
>  target/riscv/Kconfig                          |  7 ++++++
>  target/rx/Kconfig                             |  2 ++
>  target/s390x/Kconfig                          |  2 ++
>  target/sh4/Kconfig                            |  2 ++
>  target/sparc/Kconfig                          |  5 ++++
>  target/tilegx/Kconfig                         |  2 ++
>  target/tricore/Kconfig                        |  2 ++
>  target/unicore32/Kconfig                      |  3 +++
>  target/xtensa/Kconfig                         |  3 +++
>  44 files changed, 129 insertions(+), 43 deletions(-)
>  create mode 100644 target/Kconfig
>  create mode 100644 target/alpha/Kconfig
>  create mode 100644 target/arm/Kconfig
>  create mode 100644 target/avr/Kconfig
>  create mode 100644 target/cris/Kconfig
>  create mode 100644 target/hppa/Kconfig
>  create mode 100644 target/i386/Kconfig
>  create mode 100644 target/lm32/Kconfig
>  create mode 100644 target/m68k/Kconfig
>  create mode 100644 target/microblaze/Kconfig
>  create mode 100644 target/mips/Kconfig
>  create mode 100644 target/moxie/Kconfig
>  create mode 100644 target/nios2/Kconfig
>  create mode 100644 target/openrisc/Kconfig
>  create mode 100644 target/ppc/Kconfig
>  create mode 100644 target/riscv/Kconfig
>  create mode 100644 target/rx/Kconfig
>  create mode 100644 target/s390x/Kconfig
>  create mode 100644 target/sh4/Kconfig
>  create mode 100644 target/sparc/Kconfig
>  create mode 100644 target/tilegx/Kconfig
>  create mode 100644 target/tricore/Kconfig
>  create mode 100644 target/unicore32/Kconfig
>  create mode 100644 target/xtensa/Kconfig
> 



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

end of thread, other threads:[~2021-03-10 13:33 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31 11:13 [PATCH 00/10] target: Provide target-specific Kconfig Philippe Mathieu-Daudé
2021-01-31 11:13 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Philippe Mathieu-Daudé
2021-02-01 10:24   ` Alex Bennée
2021-02-01 10:24     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Philippe Mathieu-Daudé
2021-02-01 10:28   ` Alex Bennée
2021-02-01 10:28     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS Philippe Mathieu-Daudé
2021-02-01 10:29   ` Alex Bennée
2021-02-01 10:29     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS Philippe Mathieu-Daudé
2021-02-01 11:11   ` Alex Bennée
2021-02-01 11:11     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
2021-01-31 11:40   ` Artyom Tarasenko
2021-01-31 12:36   ` Philippe Mathieu-Daudé
2021-01-31 15:34     ` Philippe Mathieu-Daudé
2021-01-31 15:34       ` Philippe Mathieu-Daudé
2021-02-01 11:23   ` Alex Bennée
2021-02-01 11:23     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 06/10] target/i386: Move SEV feature to target Kconfig Philippe Mathieu-Daudé
2021-02-01 11:20   ` Alex Bennée
2021-02-01 11:20     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 07/10] target/arm: Move V7M " Philippe Mathieu-Daudé
2021-02-01 11:25   ` Alex Bennée
2021-02-01 11:25     ` Alex Bennée
2021-01-31 11:13 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Philippe Mathieu-Daudé
2021-02-01 11:53   ` Alex Bennée
2021-02-01 11:53     ` Alex Bennée
2021-02-01 19:58   ` Alistair Francis
2021-02-01 19:58     ` Alistair Francis
2021-01-31 11:13 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
2021-02-01 11:54   ` Alex Bennée
2021-02-01 11:54     ` Alex Bennée
2021-02-01 19:59   ` Alistair Francis
2021-02-01 19:59     ` Alistair Francis
2021-01-31 11:13 ` [PATCH 10/10] target: Move SEMIHOSTING " Philippe Mathieu-Daudé
2021-01-31 11:13   ` Philippe Mathieu-Daudé
2021-02-01 11:56   ` Alex Bennée
2021-02-01 11:56     ` Alex Bennée
2021-03-10 13:30 ` [PATCH 00/10] target: Provide target-specific Kconfig Claudio Fontana
2021-03-10 13:30   ` Claudio Fontana

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