diff mbox series

[RFC,v5,3/9] target/arm: Use "max" as default cpu for the virt machine with KVM

Message ID 20230120184825.31626-4-farosas@suse.de (mailing list archive)
State New, archived
Headers show
Series target/arm: Allow CONFIG_TCG=n builds | expand

Commit Message

Fabiano Rosas Jan. 20, 2023, 6:48 p.m. UTC
Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a
KVM-only build the 'max' cpu.

Note that we cannot use 'host' here because the qtests can run without
any other accelerator (than qtest) and 'host' depends on KVM being
enabled.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
---
 hw/arm/virt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Richard Henderson Jan. 20, 2023, 8:54 p.m. UTC | #1
On 1/20/23 08:48, Fabiano Rosas wrote:
> Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a
> KVM-only build the 'max' cpu.
> 
> Note that we cannot use 'host' here because the qtests can run without
> any other accelerator (than qtest) and 'host' depends on KVM being
> enabled.
> 
> Signed-off-by: Fabiano Rosas<farosas@suse.de>
> Cc: Daniel P. Berrangé<berrange@redhat.com>
> Cc: Thomas Huth<thuth@redhat.com>
> ---
>   hw/arm/virt.c | 4 ++++
>   1 file changed, 4 insertions(+)

It does seem like that path of least resistance.

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


r~
Thomas Huth Jan. 23, 2023, 8:10 a.m. UTC | #2
On 20/01/2023 19.48, Fabiano Rosas wrote:
> Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a
> KVM-only build the 'max' cpu.
> 
> Note that we cannot use 'host' here because the qtests can run without
> any other accelerator (than qtest) and 'host' depends on KVM being
> enabled.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> Cc: Daniel P. Berrangé <berrange@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> ---
>   hw/arm/virt.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index b5c711c919..8091c74e3d 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -3005,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("max");
> +#endif
>       mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
>       mc->kvm_type = virt_kvm_type;
>       assert(!mc->get_hotplug_handler);

Thanks for the update, this sounds like the best option to me.

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b5c711c919..8091c74e3d 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3005,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("max");
+#endif
     mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
     mc->kvm_type = virt_kvm_type;
     assert(!mc->get_hotplug_handler);