When testing with a WHPX-only binary, we get:
qemu-system-aarch64.exe: No accelerator selected and no default accelerator
available
Fix by checking for WHPX in configure_accelerators() and using
it by default when no other accelerator is available, similarly
to commit 964d2a0cf81 ("system: Select HVF by default ...").
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
system/vl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/system/vl.c b/system/vl.c
index 1d14e2e2076..4f6d1e1ca8b 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2444,6 +2444,7 @@ static void configure_accelerators(const char *progname)
bool have_tcg = accel_find("tcg");
bool have_kvm = accel_find("kvm");
bool have_hvf = accel_find("hvf");
+ const bool have_whpx = accel_find("whpx");
if (have_tcg && have_kvm) {
if (g_str_has_suffix(progname, "kvm")) {
@@ -2458,6 +2459,8 @@ static void configure_accelerators(const char *progname)
accelerators = "tcg";
} else if (have_hvf) {
accelerators = "hvf";
+ } else if (have_whpx) {
+ accelerators = "whpx";
} else {
error_report("No accelerator selected and"
" no default accelerator available");
--
2.53.0