[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 30/33] hw/arm/virt: Hide host CPU model for tcg
From: |
Gavin Shan |
Subject: |
[PATCH v4 30/33] hw/arm/virt: Hide host CPU model for tcg |
Date: |
Thu, 2 Nov 2023 10:24:57 +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.
ERROR:../hw/core/machine.c:1423:is_cpu_type_supported: \
assertion failed: (model != NULL)
Bail out! ERROR:../hw/core/machine.c:1423:is_cpu_type_supported: \
assertion failed: (model != NULL)
Aborted (core dumped)
Hide 'host' CPU model until KVM or HVF is enabled. With this applied,
the valid CPU models can be shown.
qemu-system-aarch64: Invalid CPU type: cortex-a8
The valid types are: cortex-a7, cortex-a15, cortex-a35, \
cortex-a55, cortex-a72, cortex-a76, cortex-a710, a64fx, \
neoverse-n1, neoverse-v1, neoverse-n2, cortex-a53, \
cortex-a57, max
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 5bacd3a7f0..1ac2e29244 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -219,7 +219,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
- [PATCH v4 21/33] target/hppa: Implement hppa_cpu_list(), (continued)
- [PATCH v4 21/33] target/hppa: Implement hppa_cpu_list(), Gavin Shan, 2023/11/01
- [PATCH v4 22/33] target/microblaze: Implement microblaze_cpu_list(), Gavin Shan, 2023/11/01
- [PATCH v4 23/33] target/nios2: Implement nios2_cpu_list(), Gavin Shan, 2023/11/01
- [PATCH v4 24/33] cpu: Mark cpu_list() supported on all targets, Gavin Shan, 2023/11/01
- [PATCH v4 25/33] machine: Constify MachineClass::valid_cpu_types[i], Gavin Shan, 2023/11/01
- [PATCH v4 26/33] machine: Use error handling when CPU type is checked, Gavin Shan, 2023/11/01
- [PATCH v4 27/33] machine: Introduce helper is_cpu_type_supported(), Gavin Shan, 2023/11/01
- [PATCH v4 28/33] machine: Print CPU model name instead of CPU type name, Gavin Shan, 2023/11/01
- [PATCH v4 29/33] hw/arm/virt: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/01
- [PATCH v4 30/33] hw/arm/virt: Hide host CPU model for tcg,
Gavin Shan <=
- [PATCH v4 31/33] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/01
- [PATCH v4 32/33] hw/arm: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/01
- [PATCH v4 33/33] hw/riscv/shakti_c: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/01