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

Tim Wiederhake posted 3 patches 5 years, 2 months ago
There is a newer version of this series
[libvirt PATCH 1/3] cpu_map: sync_qemu_i386: Detect features missing in translation table
Posted by Tim Wiederhake 5 years, 2 months ago
Signed-off-by: Tim Wiederhake <twiederh@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 8deda869df..fb4eea101b 100755
--- a/src/cpu_map/sync_qemu_i386.py
+++ b/src/cpu_map/sync_qemu_i386.py
@@ -364,6 +364,16 @@ def main():
         with open(name, "wt") as f:
             output_model(f, model)
 
+    features = set()
+    for model in models:
+        features.update(model["features"])
+
+    untranslated = [x for x in features if x not in T.values()]
+    if untranslated:
+        print(
+            "Features not in the translation table:",
+            ", ".join(sorted(untranslated)))
+
 
 if __name__ == "__main__":
     main()
-- 
2.26.2