23265d
From e8639315f3f6116b3f589657bad57a15f119ddbc Mon Sep 17 00:00:00 2001
23265d
Message-Id: <e8639315f3f6116b3f589657bad57a15f119ddbc@dist-git>
23265d
From: Jiri Denemark <jdenemar@redhat.com>
23265d
Date: Thu, 11 Jan 2018 14:33:07 +0100
23265d
Subject: [PATCH] cpu_x86: Copy CPU signature from ancestor
23265d
23265d
When specifying a new CPU model in cpu_map.xml as an extension to an
23265d
existing model, we forgot to copy the signature (family + model) from
23265d
the original CPU model.
23265d
23265d
We don't use this way of specifying CPU models, but it's still supported
23265d
and it becomes useful when someone wants to quickly hack up a CPU model
23265d
for testing or when creating additional variants of existing models to
23265d
help with fixing some spectral issues.
23265d
23265d
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23265d
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
23265d
(cherry picked from commit b427cf4831d0ea7aac9dd1a3aa7682478356a483)
23265d
23265d
https://bugzilla.redhat.com/show_bug.cgi?id=1533418
23265d
23265d
The new -IBRS and -IBPB CPU models were defined via inheritance from
23265d
their original models in RHEL. Thus when the host CPU matches the
23265d
signature of the original model from cpu_map.xml, libvirt will detect
23265d
the host CPU as the original model + the new feature rather than
23265d
reporting it as the -IBRS/-IBPB variant.
23265d
23265d
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23265d
---
23265d
 src/cpu/cpu_x86.c | 1 +
23265d
 1 file changed, 1 insertion(+)
23265d
23265d
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
23265d
index efef7f235d..41aaa61c35 100644
23265d
--- a/src/cpu/cpu_x86.c
23265d
+++ b/src/cpu/cpu_x86.c
23265d
@@ -1209,6 +1209,7 @@ x86ModelParse(xmlXPathContextPtr ctxt,
23265d
         VIR_FREE(name);
23265d
 
23265d
         model->vendor = ancestor->vendor;
23265d
+        model->signature = ancestor->signature;
23265d
         if (x86DataCopy(&model->data, &ancestor->data) < 0)
23265d
             goto error;
23265d
     }
23265d
-- 
23265d
2.15.1
23265d