[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 4/8] hw/arm/virt: Hide host CPU model for tcg
From: |
Gavin Shan |
Subject: |
[PATCH v7 4/8] hw/arm/virt: Hide host CPU model for tcg |
Date: |
Mon, 27 Nov 2023 09:12:06 +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 after the next commit
is applied to check the CPU type in machine_run_board_init().
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/arm/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index be2856c018..668c0d3194 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -220,7 +220,9 @@ static const char *valid_cpus[] = {
#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"),
};
--
2.42.0
- [PATCH v7 0/8] Unified CPU type check, Gavin Shan, 2023/11/26
- [PATCH v7 1/8] machine: Use error handling when CPU type is checked, Gavin Shan, 2023/11/26
- [PATCH v7 2/8] machine: Introduce helper is_cpu_type_supported(), Gavin Shan, 2023/11/26
- [PATCH v7 3/8] machine: Print CPU model name instead of CPU type, Gavin Shan, 2023/11/26
- [PATCH v7 4/8] hw/arm/virt: Hide host CPU model for tcg,
Gavin Shan <=
- [PATCH v7 5/8] hw/arm/virt: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/26
- [PATCH v7 6/8] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/26
- [PATCH v7 7/8] hw/arm: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/26
- [PATCH v7 8/8] hw/riscv/shakti_c: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/26
- Re: [PATCH v7 0/8] Unified CPU type check, Marcin Juszkiewicz, 2023/11/27