diff mbox series

[v3,2/3] target/arm: Select CONFIG_ARM_V7M when TCG is enabled

Message ID 20230508181611.2621-3-farosas@suse.de (mailing list archive)
State New, archived
Headers show
Series target/arm: disable-tcg and without-default-devices fixes | expand

Commit Message

Fabiano Rosas May 8, 2023, 6:16 p.m. UTC
We cannot allow this config to be disabled at the moment as not all of
the relevant code is protected by it.

Commit 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a
KVM-only build") moved the CONFIGs of several boards to Kconfig, so it
is now possible that nothing selects ARM_V7M (e.g. when doing a
--without-default-devices build).

Return the CONFIG_ARM_V7M entry to a state where it is always selected
whenever TCG is available.

Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a KVM-only build")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 target/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson May 9, 2023, 2:40 p.m. UTC | #1
On 5/8/23 19:16, Fabiano Rosas wrote:
> We cannot allow this config to be disabled at the moment as not all of
> the relevant code is protected by it.
> 
> Commit 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a
> KVM-only build") moved the CONFIGs of several boards to Kconfig, so it
> is now possible that nothing selects ARM_V7M (e.g. when doing a
> --without-default-devices build).
> 
> Return the CONFIG_ARM_V7M entry to a state where it is always selected
> whenever TCG is available.
> 
> Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a KVM-only build")
> Signed-off-by: Fabiano Rosas<farosas@suse.de>
> ---
>   target/arm/Kconfig | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Philippe Mathieu-Daudé May 9, 2023, 2:49 p.m. UTC | #2
On 8/5/23 20:16, Fabiano Rosas wrote:
> We cannot allow this config to be disabled at the moment as not all of
> the relevant code is protected by it.
> 
> Commit 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a
> KVM-only build") moved the CONFIGs of several boards to Kconfig, so it
> is now possible that nothing selects ARM_V7M (e.g. when doing a
> --without-default-devices build).
> 
> Return the CONFIG_ARM_V7M entry to a state where it is always selected
> whenever TCG is available.
> 
> Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a KVM-only build")
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>   target/arm/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
> index 3fffdcb61b..5947366f6e 100644
> --- a/target/arm/Kconfig
> +++ b/target/arm/Kconfig
> @@ -1,6 +1,7 @@
>   config ARM
>       bool
>       select ARM_COMPATIBLE_SEMIHOSTING if TCG
> +    select ARM_V7M if TCG

Probably worth a comment mentioning this is temporarily
required until <some magic happens>, so we won't forgot
to remove it.

>   
>   config AARCH64
>       bool
Paolo Bonzini May 9, 2023, 3:24 p.m. UTC | #3
On 5/9/23 16:49, Philippe Mathieu-Daudé wrote:
> On 8/5/23 20:16, Fabiano Rosas wrote:
>> We cannot allow this config to be disabled at the moment as not all of
>> the relevant code is protected by it.
>>
>> Commit 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a
>> KVM-only build") moved the CONFIGs of several boards to Kconfig, so it
>> is now possible that nothing selects ARM_V7M (e.g. when doing a
>> --without-default-devices build).
>>
>> Return the CONFIG_ARM_V7M entry to a state where it is always selected
>> whenever TCG is available.
>>
>> Fixes: 29d9efca16 ("arm/Kconfig: Do not build TCG-only boards on a 
>> KVM-only build")
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>>   target/arm/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
>> index 3fffdcb61b..5947366f6e 100644
>> --- a/target/arm/Kconfig
>> +++ b/target/arm/Kconfig
>> @@ -1,6 +1,7 @@
>>   config ARM
>>       bool
>>       select ARM_COMPATIBLE_SEMIHOSTING if TCG
>> +    select ARM_V7M if TCG
> 
> Probably worth a comment mentioning this is temporarily
> required until <some magic happens>, so we won't forgot
> to remove it.

Yeah, this one should in principle be defined by the boards, but 
m_helper.c is included unconditionally instead of having some kind of 
stub for A-only boards.

Related to this is the (right now unconditional, later on only "if TCG") 
"select ARM_GICV3_TCG" that needs to be added under ARM_GIC.

Paolo
diff mbox series

Patch

diff --git a/target/arm/Kconfig b/target/arm/Kconfig
index 3fffdcb61b..5947366f6e 100644
--- a/target/arm/Kconfig
+++ b/target/arm/Kconfig
@@ -1,6 +1,7 @@ 
 config ARM
     bool
     select ARM_COMPATIBLE_SEMIHOSTING if TCG
+    select ARM_V7M if TCG
 
 config AARCH64
     bool