Skip to content

Commit 964d2a0

Browse files
committed
system: Select HVF by default when no other accelerator is available
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é <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Message-Id: <[email protected]>
1 parent d65c890 commit 964d2a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

system/vl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,7 @@ static void configure_accelerators(const char *progname)
23622362
/* Select the default accelerator */
23632363
bool have_tcg = accel_find("tcg");
23642364
bool have_kvm = accel_find("kvm");
2365+
bool have_hvf = accel_find("hvf");
23652366

23662367
if (have_tcg && have_kvm) {
23672368
if (g_str_has_suffix(progname, "kvm")) {
@@ -2374,6 +2375,8 @@ static void configure_accelerators(const char *progname)
23742375
accelerators = "kvm";
23752376
} else if (have_tcg) {
23762377
accelerators = "tcg";
2378+
} else if (have_hvf) {
2379+
accelerators = "hvf";
23772380
} else {
23782381
error_report("No accelerator selected and"
23792382
" no default accelerator available");

0 commit comments

Comments
 (0)