render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
b971b8
From 2268a9862c16c87007bfbae117d345268f8420e4 Mon Sep 17 00:00:00 2001
b971b8
Message-Id: <2268a9862c16c87007bfbae117d345268f8420e4@dist-git>
b971b8
From: Jiri Denemark <jdenemar@redhat.com>
b971b8
Date: Tue, 26 May 2020 10:58:58 +0200
b971b8
Subject: [PATCH] cpu_map: Don't use new noTSX models for host-model CPUs
b971b8
MIME-Version: 1.0
b971b8
Content-Type: text/plain; charset=UTF-8
b971b8
Content-Transfer-Encoding: 8bit
b971b8
b971b8
Host-model CPU definitions (and domain capabilities) will use the
b971b8
original CPU models (without noTSX in their name) and explicitly disable
b971b8
hle and rtm features. This way domains with host-model CPUs will be
b971b8
migratable even to older versions of libvirt which do not support the
b971b8
noTSX model variants.
b971b8
b971b8
The new models will be advertised in host capabilities and they may
b971b8
be used explicitly with custom CPUs.
b971b8
b971b8
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
b971b8
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
b971b8
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
b971b8
(cherry picked from commit 17cdefe5f197030c70a0d250f3c5387b41663516)
b971b8
b971b8
https://bugzilla.redhat.com/show_bug.cgi?id=1840008
b971b8
b971b8
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
b971b8
Message-Id: <d27a0adb8f142f053fbd830947f03bad04eff264.1590483392.git.jdenemar@redhat.com>
b971b8
Reviewed-by: Ján Tomko <jtomko@redhat.com>
b971b8
---
b971b8
 src/cpu_map/x86_Cascadelake-Server-noTSX.xml           | 2 +-
b971b8
 src/cpu_map/x86_Icelake-Client-noTSX.xml               | 2 +-
b971b8
 src/cpu_map/x86_Icelake-Server-noTSX.xml               | 2 +-
b971b8
 src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml          | 2 +-
b971b8
 src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml          | 2 +-
b971b8
 tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml | 4 +++-
b971b8
 tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml  | 4 +++-
b971b8
 7 files changed, 11 insertions(+), 7 deletions(-)
b971b8
b971b8
diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
index 5adea664e9..459174a30d 100644
b971b8
--- a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
b971b8
@@ -1,6 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Cascadelake-Server-noTSX'>
b971b8
-    <decode host='on' guest='on'/>
b971b8
+    <decode host='on' guest='off'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
index 540732af6f..65e648ae21 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml
b971b8
@@ -1,6 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Client-noTSX'>
b971b8
-    <decode host='on' guest='on'/>
b971b8
+    <decode host='on' guest='off'/>
b971b8
     <signature family='6' model='126'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
index 5a53da23c7..2fd6906406 100644
b971b8
--- a/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
+++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml
b971b8
@@ -1,6 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Icelake-Server-noTSX'>
b971b8
-    <decode host='on' guest='on'/>
b971b8
+    <decode host='on' guest='off'/>
b971b8
     <signature family='6' model='134'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
index 0c2f1e6ac4..ffba34502a 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
b971b8
@@ -1,6 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Client-noTSX-IBRS'>
b971b8
-    <decode host='on' guest='on'/>
b971b8
+    <decode host='on' guest='off'/>
b971b8
     <signature family='6' model='94'/> 
b971b8
     <signature family='6' model='78'/> 
b971b8
     
b971b8
diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
index 91a206f575..c2b7de40e8 100644
b971b8
--- a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
+++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
b971b8
@@ -1,6 +1,6 @@
b971b8
 <cpus>
b971b8
   <model name='Skylake-Server-noTSX-IBRS'>
b971b8
-    <decode host='on' guest='on'/>
b971b8
+    <decode host='on' guest='off'/>
b971b8
     <signature family='6' model='85'/> 
b971b8
     <vendor name='Intel'/>
b971b8
     <feature name='3dnowprefetch'/>
b971b8
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
b971b8
index e03c4a06ba..92404e4d03 100644
b971b8
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
b971b8
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml
b971b8
@@ -1,5 +1,5 @@
b971b8
 <cpu mode='custom' match='exact'>
b971b8
-  <model fallback='forbid'>Skylake-Client-noTSX-IBRS</model>
b971b8
+  <model fallback='forbid'>Skylake-Client-IBRS</model>
b971b8
   <vendor>Intel</vendor>
b971b8
   <feature policy='require' name='ds'/>
b971b8
   <feature policy='require' name='acpi'/>
b971b8
@@ -26,4 +26,6 @@
b971b8
   <feature policy='require' name='pdpe1gb'/>
b971b8
   <feature policy='require' name='invtsc'/>
b971b8
   <feature policy='require' name='skip-l1dfl-vmentry'/>
b971b8
+  <feature policy='disable' name='hle'/>
b971b8
+  <feature policy='disable' name='rtm'/>
b971b8
 </cpu>
b971b8
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml
b971b8
index 3d8e6775bf..645c0934c2 100644
b971b8
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml
b971b8
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml
b971b8
@@ -1,5 +1,5 @@
b971b8
 <cpu mode='custom' match='exact'>
b971b8
-  <model fallback='forbid'>Skylake-Client-noTSX-IBRS</model>
b971b8
+  <model fallback='forbid'>Skylake-Client-IBRS</model>
b971b8
   <vendor>Intel</vendor>
b971b8
   <feature policy='require' name='ss'/>
b971b8
   <feature policy='require' name='vmx'/>
b971b8
@@ -14,4 +14,6 @@
b971b8
   <feature policy='require' name='xsaves'/>
b971b8
   <feature policy='require' name='pdpe1gb'/>
b971b8
   <feature policy='require' name='skip-l1dfl-vmentry'/>
b971b8
+  <feature policy='disable' name='hle'/>
b971b8
+  <feature policy='disable' name='rtm'/>
b971b8
 </cpu>
b971b8
-- 
b971b8
2.26.2
b971b8