[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 29/32] hw/arm/virt: Hide host CPU model for tcg
From: |
Gavin Shan |
Subject: |
[PATCH v3 29/32] hw/arm/virt: Hide host CPU model for tcg |
Date: |
Thu, 7 Sep 2023 10:35:50 +1000 |
The 'host' CPU model isn't available until KVM or HVF is enabled.
For example, the following error messages are seen when the guest
is started with option '-cpu cortex-a8' on tcg.
qemu-system-aarch64: Invalid CPU type: cortex-a8
The valid types are: cortex-a7, cortex-a15, cortex-a35, cortex-a55,
cortex-a72, cortex-a76, a64fx, neoverse-n1,
neoverse-v1, cortex-a53, cortex-a57, (null),
max
Hide 'host' CPU model until KVM or HVF is enabled.
Signed-off-by: Gavin Shan <gshan@redhat.com>
---
hw/arm/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 762780e677..bd0ad15028 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -217,7 +217,9 @@ static const char * const valid_cpu_types[] = {
#endif
ARM_CPU_TYPE_NAME("cortex-a53"),
ARM_CPU_TYPE_NAME("cortex-a57"),
+#if defined(CONFIG_KVM) || defined(CONFIG_HVF)
ARM_CPU_TYPE_NAME("host"),
+#endif
ARM_CPU_TYPE_NAME("max"),
NULL
};
--
2.41.0
- Re: [PATCH v3 24/32] machine: Constify MachineClass::valid_cpu_types[i], (continued)
[PATCH v3 28/32] hw/arm/virt: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/09/06
[PATCH v3 29/32] hw/arm/virt: Hide host CPU model for tcg,
Gavin Shan <=
[PATCH v3 30/32] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/09/06
[PATCH v3 31/32] hw/arm: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/09/06
[PATCH v3 32/32] hw/riscv/shakti_c: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/09/06