mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
cpu-data.py: Properly handle aliases
The script is used to create data files for cputest from QEMU replies. By ignoring aliases we might end up thinking a feature is not enabled by QEMU just because its name differs from the primary one in the CPU map. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
00e55059e6
commit
662e511d1e
@ -457,6 +457,11 @@ def parseMap():
|
|||||||
for reg in _KEYS[data.tag] + _REGS[data.tag]:
|
for reg in _KEYS[data.tag] + _REGS[data.tag]:
|
||||||
feature[reg] = int(data.attrib.get(reg, "0"), 0)
|
feature[reg] = int(data.attrib.get(reg, "0"), 0)
|
||||||
cpuMap[f.attrib["name"]] = feature
|
cpuMap[f.attrib["name"]] = feature
|
||||||
|
|
||||||
|
for alias in f.iterfind("alias"):
|
||||||
|
if alias.attrib["source"] == "qemu":
|
||||||
|
cpuMap[alias.attrib["name"]] = feature
|
||||||
|
|
||||||
return cpuMap
|
return cpuMap
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user