Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/cpu_map/sync_qemu_i386.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 83b21a93e5..d2a05db77c 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 def translate_vendor(name): @@ -393,6 +394,22 @@ def main(): with open(name, "wt") as f: output_model(f, model) + features = set() + for model in models: + features.update(model["features"]) + + try: + filename = os.path.join(args.outdir, "x86_features.xml") + dom = xml.etree.ElementTree.parse(filename) + known = [x.attrib["name"] for x in dom.getroot().iter("feature")] + unknown = [x for x in features if x not in known and x is not None] + except Exception as e: + unknown = [] + print("warning: Unable to read libvirt x86_features.xml: {}".format(e)) + + for x in unknown: + print("warning: Feature unknown to libvirt: {}".format(x)) + if __name__ == "__main__": main() -- 2.26.2