All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Claudio Fontana" <cfontana@suse.de>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Cornelia Huck" <cohuck@redhat.com>
Subject: Re: [PATCH v6 19/29] target/arm: Move 64-bit TCG CPUs into tcg/
Date: Wed, 22 Feb 2023 10:58:42 -0300	[thread overview]
Message-ID: <87356xol7x.fsf@suse.de> (raw)
In-Reply-To: <CAFEAcA__kyfbPv5tmSTiBJ_O15ND5-QpKpATx856s8XCoUNORw@mail.gmail.com>

Peter Maydell <peter.maydell@linaro.org> writes:

> On Fri, 17 Feb 2023 at 20:15, Fabiano Rosas <farosas@suse.de> wrote:
>>
>> Move the 64-bit CPUs that are TCG-only:
>> - cortex-a35
>> - cortex-a55
>> - cortex-a72
>> - cortex-a76
>> - a64fx
>> - neoverse-n1
>>
>> Keep the CPUs that can be used with KVM:
>> - cortex-a57
>> - cortex-a53
>> - max
>> - host
>>
>> For the special case "max" CPU, there's a nuance that while KVM/HVF
>> use the "host" model instead, we still cannot move all of the TCG code
>> into the tcg directory because the qtests might reach the !kvm && !hvf
>> branch. Keep the cortex_a57_initfn() call to cover that scenario.
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>
>
>> -/* -cpu max: if KVM is enabled, like -cpu host (best possible with this host);
>> - * otherwise, a CPU with as many features enabled as our emulation supports.
>> - * The version of '-cpu max' for qemu-system-arm is defined in cpu.c;
>> - * this only needs to handle 64 bits.
>> - */
>>  static void aarch64_max_initfn(Object *obj)
>>  {
>> -    ARMCPU *cpu = ARM_CPU(obj);
>> -    uint64_t t;
>> -    uint32_t u;
>> -
>>      if (kvm_enabled() || hvf_enabled()) {
>>          /* With KVM or HVF, '-cpu max' is identical to '-cpu host' */
>>          aarch64_host_initfn(obj);
>>          return;
>>      }
>>
>> +    if (tcg_enabled() || qtest_enabled()) {
>> +        aarch64_a57_initfn(obj);
>> +    }
>> +
>
>
>
>> +    if (tcg_enabled()) {
>> +        aarch64_max_tcg_initfn(obj);
>> +    }
>
> Why do this only for TCG, and not qtest ?

I was trying to give qtest a minimum set of features, since it shouldn't
require any to begin with.

I could probably revert to the old behavior of having this code for
qtest as well without breaking the build. It's just a matter of moving
some stuff back from the tcg-only land.

  reply	other threads:[~2023-02-22 13:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 20:11 [PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 01/29] target/arm: rename handle_semihosting to tcg_handle_semihosting Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 02/29] target/arm: wrap psci call with tcg_enabled Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 03/29] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled() Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 04/29] target/arm: Move PC alignment check Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 05/29] target/arm: Move cpregs code out of cpu.h Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 06/29] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled Fabiano Rosas
2023-02-18  4:06   ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 07/29] target/arm: Wrap TCG-only code in debug_helper.c Fabiano Rosas
2023-02-18  4:10   ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 08/29] target/arm: move translate modules to tcg/ Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 09/29] target/arm: move helpers " Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 10/29] target/arm: Move psci.c into the tcg directory Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 11/29] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 12/29] target/arm: Move hflags code into the tcg directory Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 13/29] target/arm: Move regime_using_lpae_format into internal.h Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 14/29] target/arm: Don't access TCG code when debugging with KVM Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 15/29] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 16/29] target/arm: Move cortex sysregs into cpu64.c Fabiano Rosas
2023-02-18  4:26   ` Richard Henderson
2023-02-17 20:11 ` [PATCH v6 17/29] tests/avocado: Skip tests that require a missing accelerator Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 18/29] tests/avocado: Tag TCG tests with accel:tcg Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 19/29] target/arm: Move 64-bit TCG CPUs into tcg/ Fabiano Rosas
2023-02-21 14:16   ` Peter Maydell
2023-02-22 13:58     ` Fabiano Rosas [this message]
2023-02-17 20:11 ` [PATCH v6 20/29] target/arm: move cpu_tcg to tcg/cpu32.c Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 21/29] target/arm: Use "max" as default cpu for the virt machine with KVM Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 22/29] tests/qtest: arm-cpu-features: Match tests to required accelerators Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 23/29] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 24/29] target/avocado: Pass parameters to migration test Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 25/29] tests/avocado: add machine:none tag to version.py Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 26/29] arm/Kconfig: Always select SEMIHOSTING when TCG is present Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 27/29] arm/Kconfig: Do not build TCG-only boards on a KVM-only build Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 28/29] gitlab-ci: Check building KVM-only aarch64 target Fabiano Rosas
2023-02-17 20:11 ` [PATCH v6 29/29] tests/qtest: Fix tests when no KVM or TCG are present Fabiano Rosas
2023-02-21 14:21 ` [PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds Peter Maydell
2023-02-22 12:40   ` Fabiano Rosas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87356xol7x.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=agraf@csgraf.de \
    --cc=alex.bennee@linaro.org \
    --cc=cfontana@suse.de \
    --cc=cohuck@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.