qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator


From: Philippe Mathieu-Daudé
Subject: [RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator
Date: Thu, 19 Jan 2023 11:05:35 +0100

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
RFC: CONFIG_HVF is poisoned.

We could pass host config definitions to qtest using:

  diff --git a/meson.build b/meson.build
  @@ -2547,6 +2547,7 @@ foreach target : target_dirs

     accel_kconfig = []
     foreach sym: accelerators
  +    config_host_data.set(sym + '_QTEST', '')
       if sym == 'CONFIG_TCG' or target in accelerator_targets.get(sym, [])
         config_target += { sym: 'y' }
         config_all += { sym: 'y' }

Then test for CONFIG_HVF_QTEST ...
---
 tests/qtest/libqtest.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 6b2216cb20..31650bdc9f 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -901,6 +901,8 @@ bool qtest_has_accel(const char *accel_name)
                 }
             }
         }
+    } else if (g_str_equal(accel_name, "hvf")) {
+        return true; /* XXX CONFIG_HVF is poisoned... */
     } else {
         /* not implemented */
         g_assert_not_reached();
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]