qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/arm/virt.c: Fix wrong default cpu type in AARCH64
@ 2025-04-02 13:54 Zhang Chen
  2025-04-02 18:42 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Zhang Chen @ 2025-04-02 13:54 UTC (permalink / raw)
  To: qemu-devel, qemu-arm, Peter Maydell; +Cc: Zhang Chen

Because of the CONFIG_TCG auto enabled, the cpu type "cortex-a15"
is mistakenly set to the default AARCH64 target.

Signed-off-by: Zhang Chen <zhangckid@gmail.com>
---
 hw/arm/virt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a96452f17a..63649e9543 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3178,9 +3178,10 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
     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
+#ifdef TARGET_AARCH64
     mc->default_cpu_type = ARM_CPU_TYPE_NAME("max");
-#endif
+#endif /* TARGET_AARCH64 */
+#endif /* CONFIG_TCG */
     mc->valid_cpu_types = valid_cpu_types;
     mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
     mc->kvm_type = virt_kvm_type;
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-29  3:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 13:54 [PATCH] hw/arm/virt.c: Fix wrong default cpu type in AARCH64 Zhang Chen
2025-04-02 18:42 ` Richard Henderson
2025-04-03  2:23   ` Zhang Chen
2025-04-24  8:56     ` Zhang Chen
2025-04-24  9:58       ` Philippe Mathieu-Daudé
2025-04-28  3:17         ` Zhang Chen
2025-04-28 12:47       ` Peter Maydell
2025-04-29  3:22         ` Zhang Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).