qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 1/5] meson: Introduce target-specific Kconfig


From: Alex Bennée
Subject: Re: [PATCH v1 1/5] meson: Introduce target-specific Kconfig
Date: Tue, 06 Jul 2021 14:52:19 +0100
User-agent: mu4e 1.5.13; emacs 28.0.50

Thomas Huth <thuth@redhat.com> writes:

> On 06/07/2021 14.47, Philippe Mathieu-Daudé wrote:
>> On 7/6/21 12:52 PM, Thomas Huth wrote:
>>> On 21/06/2021 17.21, Alex Bennée wrote:
>>>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>>
>>>> Add a target-specific Kconfig. We need the definitions in Kconfig so
>>>> the minikconf tool can verify they exit. However CONFIG_FOO is only
>>>
>>> s/exit/exist/ ?
>>>
>>>> enabled for target foo via the meson.build rules.
>>>>
>>>> Two architecture have a particularity, ARM and MIPS:
>>>> their 64-bit version include the 32-bit subset.
>>>
>>> Why do you mention these here, but not x86, Sparc, PPC and RISC-V which
>>> also have 32-bit and 64-bit variants?
>> Because we consider them as different targets, they don't include
>> (kselect) the subset.
>
> And why is that done this way? There is certainly a big difference
> between Sparc and Sparc64, but for x86 and PPC, the 64-bit variant is
> a superset of the 32-bit variant, so why is it done different here
> compared to ARM and MIPS?

Both ARM and MIPS have a somewhat separated set of translate.c functions
which means they can be built as individual units. AFAICT all the others
have a unified translate.c that handles all ISA variants so they
couldn't be built as standalone units if they wanted to.

You are right for AArch64 at least we have to include translate.c to
support AArch32 encoding. But for qemu-arm we skip all the 64 bit stuff
by compilation units:

arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
  'cpu64.c',
  'gdbstub64.c',
  'helper-a64.c',
  'mte_helper.c',
  'pauth_helper.c',
  'sve_helper.c',
  'translate-a64.c',
  'translate-sve.c',
))


>
>  Thomas
>
>
>>>
>>> The patch itself looks fine to me, so once you've clarified the commit
>>> message:
>>>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>>
>>>
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> Message-Id: <20210131111316.232778-6-f4bug@amsat.org>
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>
>>>> ---
>>>> vajb:
>>>>     - removed targets that no longer exist
>>>>     - reword commit message to show why we need the Kconfigs
>>>> ---
>> 
>>>> diff --git a/target/arm/Kconfig b/target/arm/Kconfig
>>>> new file mode 100644
>>>> index 0000000000..3f3394a22b
>>>> --- /dev/null
>>>> +++ b/target/arm/Kconfig
>>>> @@ -0,0 +1,6 @@
>>>> +config ARM
>>>> +    bool
>>>> +
>>>> +config AARCH64
>>>> +    bool
>>>> +    select ARM
>> 
>>>> diff --git a/target/mips/Kconfig b/target/mips/Kconfig
>>>> new file mode 100644
>>>> index 0000000000..6adf145354
>>>> --- /dev/null
>>>> +++ b/target/mips/Kconfig
>>>> @@ -0,0 +1,6 @@
>>>> +config MIPS
>>>> +    bool
>>>> +
>>>> +config MIPS64
>>>> +    bool
>>>> +    select MIPS
>> 


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]