[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for K
From: |
Claudio Fontana |
Subject: |
Re: [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for KVM-only build |
Date: |
Fri, 13 Jan 2023 15:33:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 1/13/23 15:04, Fabiano Rosas wrote:
> The cortex-a15 is not present anymore when CONFIG_TCG=n, so use the
> cortex-a57 as default cpu for KVM.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Our recommendation currently for KVM on ARM is to always use CPU="host", as
named cpu models generally don't work (yet?) with KVM.
https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html
Should then "host" be the default for KVM if CONFIG_TCG=N or CONFIG_TCG=M and
the TCG .so is not loaded?
Thanks,
Claudio
> ---
> hw/arm/virt.c | 6 ++++++
> tests/qtest/arm-cpu-features.c | 3 +--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index ea2413a0ba..19854f4137 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -203,8 +203,10 @@ static const int a15irqmap[] = {
> };
>
> static const char *valid_cpus[] = {
> +#ifdef CONFIG_TCG
> ARM_CPU_TYPE_NAME("cortex-a7"),
> ARM_CPU_TYPE_NAME("cortex-a15"),
> +#endif
> ARM_CPU_TYPE_NAME("cortex-a35"),
> ARM_CPU_TYPE_NAME("cortex-a53"),
> ARM_CPU_TYPE_NAME("cortex-a55"),
> @@ -3003,7 +3005,11 @@ static void virt_machine_class_init(ObjectClass *oc,
> void *data)
> mc->minimum_page_bits = 12;
> mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
> mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
> +#ifdef CONFIG_TCG
> mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
> +#else
> + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a57");
> +#endif
> mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
> mc->kvm_type = virt_kvm_type;
> assert(!mc->get_hotplug_handler);
> diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
> index 8691802950..4be1415823 100644
> --- a/tests/qtest/arm-cpu-features.c
> +++ b/tests/qtest/arm-cpu-features.c
> @@ -507,8 +507,7 @@ static void test_query_cpu_model_expansion_kvm(const void
> *data)
> char *error;
>
> assert_error(qts, "cortex-a15",
> - "We cannot guarantee the CPU type 'cortex-a15' works "
> - "with KVM on this host", NULL);
> + "The CPU type 'cortex-a15' is not a recognized ARM CPU type",
> NULL);
>
> assert_has_feature_enabled(qts, "host", "aarch64");
>
- [RFC PATCH v3 13/28] target/arm: Move hflags code into the tcg directory, (continued)
- [RFC PATCH v3 13/28] target/arm: Move hflags code into the tcg directory, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 14/28] target/arm: Move regime_using_lpae_format into internal.h, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 15/28] target/arm: Don't access TCG code when debugging with KVM, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 16/28] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 18/28] target/arm: Move common cpu code into cpu.c, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 19/28] target/arm: move cpu_tcg to tcg/cpu32.c, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 17/28] target/arm: Move cortex sysregs into cpregs.c, Fabiano Rosas, 2023/01/13
- [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for KVM-only build, Fabiano Rosas, 2023/01/13
- Re: [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for KVM-only build,
Claudio Fontana <=
- Re: [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for KVM-only build, Richard Henderson, 2023/01/13
- Re: [RFC PATCH v3 20/28] target/arm: Set cortex-a57 as default cpu for KVM-only build, Peter Maydell, 2023/01/16
[RFC PATCH v3 21/28] tests/qtest: Skip tests that depend on TCG when CONFIG_TCG=n, Fabiano Rosas, 2023/01/13