[PATCH 3/5] sync_qemu_models_i386: Ignore old models

Jiri Denemark posted 5 patches 4 weeks ago
There is a newer version of this series
[PATCH 3/5] sync_qemu_models_i386: Ignore old models
Posted by Jiri Denemark 4 weeks ago
Do not try to generated definition of ancient models (and their
versions). We don't want to generate (and then manually get remove
before committing) -v1 variants of CPU models that are pretty much
useless now.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---

Notes:
    The main questions is which models should be in the list. All lowercase
    models should definitely be there. I also added Conroe and Penryn and
    all the Opteron_G* models. But I'm not quite sure if they should be
    there or not.

 src/cpu_map/sync_qemu_models_i386.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map/sync_qemu_models_i386.py
index 11fe1f7435..82437a6788 100755
--- a/src/cpu_map/sync_qemu_models_i386.py
+++ b/src/cpu_map/sync_qemu_models_i386.py
@@ -9,6 +9,31 @@ import lxml.etree
 import lark
 
 
+# Old QEMU models we just ignore, they don't get any updates anyway.
+old_models = [
+    "486",
+    "athlon",
+    "Conroe",
+    "core2duo",
+    "coreduo",
+    "kvm32",
+    "kvm64",
+    "n270",
+    "Opteron_G1",
+    "Opteron_G2",
+    "Opteron_G3",
+    "Opteron_G4",
+    "Opteron_G5",
+    "Penryn",
+    "pentium",
+    "pentium2",
+    "pentium3",
+    "phenom",
+    "qemu32",
+    "qemu64",
+]
+
+
 def translate_vendor(name):
     T = {
         "CPUID_VENDOR_AMD": "AMD",
@@ -465,6 +490,9 @@ def expand_model(outdir, model):
         "signature": list(),
     }
 
+    if result["name"] in old_models:
+        return
+
     if ".family" in model and ".model" in model:
         result["signature"].append((model.pop(".family"),
                                     model.pop(".model"),
-- 
2.47.0