* [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
[not found] <20210131111316.232778-1-f4bug@amsat.org>
@ 2021-01-31 11:13 ` Philippe Mathieu-Daudé
2021-02-01 11:56 ` Alex Bennée
[not found] ` <20210131111316.232778-2-f4bug@amsat.org>
` (9 subsequent siblings)
10 siblings, 1 reply; 15+ 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] 15+ messages in thread
* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
[not found] ` <d4a706cb-11ac-1c79-9641-c061bffea829@amsat.org>
@ 2021-01-31 15:34 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS
[not found] ` <20210131111316.232778-2-f4bug@amsat.org>
@ 2021-02-01 10:24 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards
[not found] ` <20210131111316.232778-3-f4bug@amsat.org>
@ 2021-02-01 10:28 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS
[not found] ` <20210131111316.232778-4-f4bug@amsat.org>
@ 2021-02-01 10:29 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS
[not found] ` <20210131111316.232778-5-f4bug@amsat.org>
@ 2021-02-01 11:11 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 06/10] target/i386: Move SEV feature to target Kconfig
[not found] ` <20210131111316.232778-7-f4bug@amsat.org>
@ 2021-02-01 11:20 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 05/10] meson: Introduce target-specific Kconfig
[not found] ` <20210131111316.232778-6-f4bug@amsat.org>
[not found] ` <d4a706cb-11ac-1c79-9641-c061bffea829@amsat.org>
@ 2021-02-01 11:23 ` Alex Bennée
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 07/10] target/arm: Move V7M feature to target Kconfig
[not found] ` <20210131111316.232778-8-f4bug@amsat.org>
@ 2021-02-01 11:25 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
[not found] ` <20210131111316.232778-9-f4bug@amsat.org>
@ 2021-02-01 11:53 ` Alex Bennée
2021-02-01 19:58 ` Alistair Francis
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
[not found] ` <20210131111316.232778-10-f4bug@amsat.org>
@ 2021-02-01 11:54 ` Alex Bennée
2021-02-01 19:59 ` Alistair Francis
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig
2021-01-31 11:13 ` [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
@ 2021-02-01 11:56 ` Alex Bennée
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection
[not found] ` <20210131111316.232778-9-f4bug@amsat.org>
2021-02-01 11:53 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Alex Bennée
@ 2021-02-01 19:58 ` Alistair Francis
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig
[not found] ` <20210131111316.232778-10-f4bug@amsat.org>
2021-02-01 11:54 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Alex Bennée
@ 2021-02-01 19:59 ` Alistair Francis
1 sibling, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH 00/10] target: Provide target-specific Kconfig
[not found] <20210131111316.232778-1-f4bug@amsat.org>
` (9 preceding siblings ...)
[not found] ` <20210131111316.232778-10-f4bug@amsat.org>
@ 2021-03-10 13:30 ` Claudio Fontana
10 siblings, 0 replies; 15+ 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] 15+ messages in thread
end of thread, other threads:[~2021-03-10 13:33 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210131111316.232778-1-f4bug@amsat.org>
2021-01-31 11:13 ` [PATCH 10/10] target: Move SEMIHOSTING feature to target Kconfig Philippe Mathieu-Daudé
2021-02-01 11:56 ` Alex Bennée
[not found] ` <20210131111316.232778-2-f4bug@amsat.org>
2021-02-01 10:24 ` [PATCH 01/10] hw/sh4/Kconfig: Rename CONFIG_SH4 -> CONFIG_SH4_PERIPHERALS Alex Bennée
[not found] ` <20210131111316.232778-3-f4bug@amsat.org>
2021-02-01 10:28 ` [PATCH 02/10] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards Alex Bennée
[not found] ` <20210131111316.232778-4-f4bug@amsat.org>
2021-02-01 10:29 ` [PATCH 03/10] hw/sh4/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_PERIPHERALS Alex Bennée
[not found] ` <20210131111316.232778-5-f4bug@amsat.org>
2021-02-01 11:11 ` [PATCH 04/10] hw/lm32/Kconfig: Have MILKYMIST select LM32_PERIPHERALS Alex Bennée
[not found] ` <20210131111316.232778-7-f4bug@amsat.org>
2021-02-01 11:20 ` [PATCH 06/10] target/i386: Move SEV feature to target Kconfig Alex Bennée
[not found] ` <20210131111316.232778-6-f4bug@amsat.org>
[not found] ` <d4a706cb-11ac-1c79-9641-c061bffea829@amsat.org>
2021-01-31 15:34 ` [PATCH 05/10] meson: Introduce target-specific Kconfig Philippe Mathieu-Daudé
2021-02-01 11:23 ` Alex Bennée
[not found] ` <20210131111316.232778-8-f4bug@amsat.org>
2021-02-01 11:25 ` [PATCH 07/10] target/arm: Move V7M feature to target Kconfig Alex Bennée
[not found] ` <20210131111316.232778-9-f4bug@amsat.org>
2021-02-01 11:53 ` [PATCH 08/10] default-configs: Remove unnecessary SEMIHOSTING selection Alex Bennée
2021-02-01 19:58 ` Alistair Francis
[not found] ` <20210131111316.232778-10-f4bug@amsat.org>
2021-02-01 11:54 ` [PATCH 09/10] target: Move ARM_COMPATIBLE_SEMIHOSTING feature to target Kconfig Alex Bennée
2021-02-01 19:59 ` Alistair Francis
2021-03-10 13:30 ` [PATCH 00/10] target: Provide target-specific Kconfig Claudio Fontana
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).