If a feature is added (or removed) in a QEMU CPU model version, we
get to see the QEMU pretty name for the feature, not the name of
the macro.
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/cpu_map/sync_qemu_i386.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py
index 2219e67454..b27e5793ff 100755
--- a/src/cpu_map/sync_qemu_i386.py
+++ b/src/cpu_map/sync_qemu_i386.py
@@ -158,6 +158,7 @@ def translate_feature(name):
name == "0",
name.startswith("VMX_"),
name.startswith("MSR_VMX_"),
+ name.startswith("vmx-"),
# set to "no auto enable" by qemu
name == "CPUID_EXT3_TOPOEXT",
@@ -170,6 +171,10 @@ def translate_feature(name):
if name in T:
return T[name]
+ for v in T.values():
+ if name.replace("-", "_") == v.replace("-",
"_"):
+ return v
+
print("warning: Unknown feature '{}'".format(name))
return name
--
2.26.2