[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/13] system: Select HVF by default when no other accelerator is
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 13/13] system: Select HVF by default when no other accelerator is available |
Date: |
Tue, 3 Dec 2024 12:31:40 +0100 |
When testing with a HVF-only binary, we get:
3/12 qemu:func-quick+func-aarch64 / func-aarch64-version
ERROR 0.29s exit status 1
stderr:
Traceback (most recent call last):
File "tests/functional/test_version.py", line 22, in
test_qmp_human_info_version
self.vm.launch()
File "machine/machine.py", line 461, in launch
raise VMLaunchFailure(
qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish
session: EOFError
Exit code: 1
Command: build/qemu-system-aarch64 -display none -vga none -chardev
socket,id=mon,fd=5 -mon chardev=mon,mode=control -machine none -nodefaults
Output: qemu-system-aarch64: No accelerator selected and no default
accelerator available
Fix by checking for HVF in configure_accelerators() and using
it by default when no other accelerator is available.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20241203094232.62232-1-philmd@linaro.org>
---
system/vl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/system/vl.c b/system/vl.c
index 54998fdbc7e..2f855d83fbb 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2362,6 +2362,7 @@ static void configure_accelerators(const char *progname)
/* Select the default accelerator */
bool have_tcg = accel_find("tcg");
bool have_kvm = accel_find("kvm");
+ bool have_hvf = accel_find("hvf");
if (have_tcg && have_kvm) {
if (g_str_has_suffix(progname, "kvm")) {
@@ -2374,6 +2375,8 @@ static void configure_accelerators(const char *progname)
accelerators = "kvm";
} else if (have_tcg) {
accelerators = "tcg";
+ } else if (have_hvf) {
+ accelerators = "hvf";
} else {
error_report("No accelerator selected and"
" no default accelerator available");
--
2.45.2
- [PULL 04/13] MAINTAINERS: add myself as the maintainer for LoongArch VirtMachine, (continued)
- [PULL 04/13] MAINTAINERS: add myself as the maintainer for LoongArch VirtMachine, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 05/13] meson: Add missing SDL dependency to system/main.c, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 06/13] MAINTAINERS: update email addr for Brian Cain, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 07/13] hw/core/machine: diagnose wrapping of maxmem, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 08/13] target/riscv: Avoid bad shift in riscv_cpu_do_interrupt(), Philippe Mathieu-Daudé, 2024/12/03
- [PULL 09/13] hw/display/vga: Do not reset 'big_endian_fb' in vga_common_reset(), Philippe Mathieu-Daudé, 2024/12/03
- [PULL 10/13] hw/virtio: fix crash in processing balloon stats, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 11/13] tests/qtest: drop 'fuzz-' prefix from virtio-balloon test, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 12/13] tests/qtest: add test for querying balloon guest stats, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 13/13] system: Select HVF by default when no other accelerator is available,
Philippe Mathieu-Daudé <=
- Re: [PULL 00/13] Misc fixes for 2024-12-03, Peter Maydell, 2024/12/03