All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG)
@ 2025-01-03 15:05 Philippe Mathieu-Daudé
  2025-01-03 15:15 ` Daniel P. Berrangé
  2025-01-06 17:33 ` Richard Henderson
  0 siblings, 2 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-01-03 15:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Daniel Henrique Barboza, Richard Henderson,
	Paolo Bonzini, Philippe Mathieu-Daudé,
	Daniel P. Berrangé

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/Z07YASl2Pd3CPtjE@redhat.com/
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-08  8:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 15:05 [PATCH] system: Try hardware accelerators (KVM, HVF) before software one (TCG) Philippe Mathieu-Daudé
2025-01-03 15:15 ` Daniel P. Berrangé
2025-01-03 17:16   ` Philippe Mathieu-Daudé
2025-01-03 17:48     ` Peter Xu
2025-01-04 11:28   ` Phil Dennis-Jordan
2025-01-06 18:43     ` Daniel P. Berrangé
2025-01-08  8:36       ` Phil Dennis-Jordan
2025-01-06 17:33 ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.