abb18f
From d03c369dd75c747f25ecc34af3b9d79adf92ea0c Mon Sep 17 00:00:00 2001
abb18f
Message-Id: <d03c369dd75c747f25ecc34af3b9d79adf92ea0c@dist-git>
abb18f
From: Jiri Denemark <jdenemar@redhat.com>
abb18f
Date: Tue, 26 Apr 2022 12:50:41 +0200
abb18f
Subject: [PATCH] cpu_map: Disable cpu64-rhel* for host-model and baseline
abb18f
abb18f
These ancient RHEL-only CPU models should not really be used by any CPU
abb18f
definition created by libvirt. We keep them just for backwards
abb18f
compatibility with domains which might still be using them.
abb18f
abb18f
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
abb18f
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
abb18f
(cherry picked from commit d2e4d66be35cd04da72e5f5129a8a4da6a931505)
abb18f
abb18f
https://bugzilla.redhat.com/show_bug.cgi?id=2084030
abb18f
abb18f
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
abb18f
---
abb18f
 src/cpu_map/x86_cpu64-rhel5.xml                        | 2 +-
abb18f
 src/cpu_map/x86_cpu64-rhel6.xml                        | 2 +-
abb18f
 tests/cputestdata/x86_64-baseline-no-vendor-result.xml | 3 ++-
abb18f
 3 files changed, 4 insertions(+), 3 deletions(-)
abb18f
abb18f
diff --git a/src/cpu_map/x86_cpu64-rhel5.xml b/src/cpu_map/x86_cpu64-rhel5.xml
abb18f
index be6bcdb7a6..7402b7603c 100644
abb18f
--- a/src/cpu_map/x86_cpu64-rhel5.xml
abb18f
+++ b/src/cpu_map/x86_cpu64-rhel5.xml
abb18f
@@ -1,6 +1,6 @@
abb18f
 <cpus>
abb18f
   <model name='cpu64-rhel5'>
abb18f
-    <decode host='on' guest='on'/>
abb18f
+    <decode host='off' guest='off'/>
abb18f
     <feature name='apic'/>
abb18f
     <feature name='clflush'/>
abb18f
     <feature name='cmov'/>
abb18f
diff --git a/src/cpu_map/x86_cpu64-rhel6.xml b/src/cpu_map/x86_cpu64-rhel6.xml
abb18f
index c62b1b5575..061939c733 100644
abb18f
--- a/src/cpu_map/x86_cpu64-rhel6.xml
abb18f
+++ b/src/cpu_map/x86_cpu64-rhel6.xml
abb18f
@@ -1,6 +1,6 @@
abb18f
 <cpus>
abb18f
   <model name='cpu64-rhel6'>
abb18f
-    <decode host='on' guest='on'/>
abb18f
+    <decode host='off' guest='off'/>
abb18f
     <feature name='apic'/>
abb18f
     <feature name='clflush'/>
abb18f
     <feature name='cmov'/>
abb18f
diff --git a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
abb18f
index 00e03b2152..4b4921cf93 100644
abb18f
--- a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
abb18f
+++ b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
abb18f
@@ -1,3 +1,4 @@
abb18f
 <cpu mode='custom' match='exact'>
abb18f
-  <model fallback='allow'>cpu64-rhel6</model>
abb18f
+  <model fallback='allow'>kvm64</model>
abb18f
+  <feature policy='require' name='lahf_lm'/>
abb18f
 </cpu>
abb18f
-- 
abb18f
2.35.1
abb18f