As Daniel suggested [*]: > We should consider to rank HVF above TCG, on the basis > that HW acceleration is faster and should provide a > host<->guest security boundary that we don't claim for TCG
[*] https://lore.kernel.org/qemu-devel/z07yasl2pd3cp...@redhat.com/ Suggested-by: Daniel P. Berrangé <berra...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- system/vl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system/vl.c b/system/vl.c index 0843b7ab49b..e20391281f8 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2379,7 +2379,6 @@ 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")) { @@ -2390,10 +2389,10 @@ static void configure_accelerators(const char *progname) } } else if (have_kvm) { accelerators = "kvm"; + } else if (accel_find("hvf")) { + accelerators = "hvf"; } else if (have_tcg) { accelerators = "tcg"; - } else if (have_hvf) { - accelerators = "hvf"; } else { error_report("No accelerator selected and" " no default accelerator available"); -- 2.47.1