[libvirt PATCH] cpu-data.py: Query hyperv enlightenments

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

 



Reporting hv-* properties properly requires hv to be enabled,
see qemu commit 071ce4b03b.

Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 tests/cputestdata/cpu-data.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py
index d8a89ebc2a..0200db7a78 100755
--- a/tests/cputestdata/cpu-data.py
+++ b/tests/cputestdata/cpu-data.py
@@ -216,12 +216,19 @@ def gather_model(args):
             "id": "model-expansion"
         }])
 
+    version = 0, 0
     static_model = None
     for o in output:
         if o.get("id") == "model-expansion":
             static_model = o["return"]["model"]
+        if "QMP" in o:
+            version = o["QMP"]["version"]["qemu"]
+            version = version["major"], version["minor"]
 
     if static_model:
+        if version[0] > 6 or (version[0] == 6 and version[1] >= 1):
+            static_model["props"]["hv-passthrough"] = True
+
         return call_qemu(args.path_to_qemu, [
             {
                 "execute": "query-cpu-model-expansion",
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux