[libvirt PATCH 3/3] cpu_map: sync_qemu_i386: Detect features missing in libvirt

Tim Wiederhake twiederh at redhat.com
Wed Nov 18 11:19:49 UTC 2020


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/cpu_map/sync_qemu_i386.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py
index 684fc96dc0..8844aa00cd 100755
--- a/src/cpu_map/sync_qemu_i386.py
+++ b/src/cpu_map/sync_qemu_i386.py
@@ -5,6 +5,7 @@ import copy
 import lark
 import os
 import re
+import xml.etree.ElementTree
 
 
 T = {
@@ -382,6 +383,15 @@ def main():
             "Features not in the translation table:",
             ", ".join(sorted(untranslated)))
 
+    filename = os.path.join(args.outdir, "x86_features.xml")
+    DOMTree = xml.etree.ElementTree.parse(filename)
+    known = [x.attrib["name"] for x in DOMTree.getroot().iter("feature")]
+    unknown = [x for x in features if x not in known]
+    if unknown:
+        print(
+            "Features not in libvirt:",
+            ", ".join(sorted(unknown)))
+
 
 if __name__ == "__main__":
     main()
-- 
2.26.2




More information about the libvir-list mailing list