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