mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
cpu_map: sync_qemu_cpu_i386: Detect features missing in libvirt
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
d032c73f78
commit
f6c11a23c8
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user