render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
404507
From 38b3d773dddd7f3cfe715b9cbabaa296c16c1290 Mon Sep 17 00:00:00 2001
404507
Message-Id: <38b3d773dddd7f3cfe715b9cbabaa296c16c1290@dist-git>
23265d
From: Jiri Denemark <jdenemar@redhat.com>
404507
Date: Fri, 5 Jan 2018 17:43:03 +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
404507
https://bugzilla.redhat.com/show_bug.cgi?id=1533125
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
404507
index ad35532fc1..001109f701 100644
23265d
--- a/src/cpu/cpu_x86.c
23265d
+++ b/src/cpu/cpu_x86.c
404507
@@ -1227,6 +1227,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