render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
397dc2
From b177f66b37d0c64216ec579a5211461609a96ea8 Mon Sep 17 00:00:00 2001
397dc2
Message-Id: <b177f66b37d0c64216ec579a5211461609a96ea8@dist-git>
397dc2
From: Tim Wiederhake <twiederh@redhat.com>
397dc2
Date: Fri, 15 Jan 2021 15:17:22 +0100
397dc2
Subject: [PATCH] cpu_map: Define and enable Snowridge model
397dc2
397dc2
Due to missing pdpe1gb support in the host CPU data, the CPU is still
397dc2
incorrectly detected as Westmere-IBRS for host capabilities because we
397dc2
don't have the option to disable features included in the base model
397dc2
there.
397dc2
397dc2
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
397dc2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
(cherry picked from commit f0a5cf4b8a8b5a68348df5e8b197f30dd90b3c34)
397dc2
397dc2
https://bugzilla.redhat.com/show_bug.cgi?id=1537734
397dc2
397dc2
Conflicts:
397dc2
- src/cpu_map/index.xml: Context
397dc2
- src/cpu_map/meson.build: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.1.0.x86_64.xml: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml: Not present downstream
397dc2
- tests/domaincapsdata/qemu_5.2.0.x86_64.xml: Not present downstream
397dc2
397dc2
Additions:
397dc2
- src/cpu_map/Makefile.inc.am: Replaces upstream change of "meson.build"
397dc2
397dc2
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
397dc2
Message-Id: <20210115141722.14986-7-twiederh@redhat.com>
397dc2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
---
397dc2
 src/cpu_map/Makefile.inc.am                   |  1 +
397dc2
 src/cpu_map/index.xml                         |  1 +
397dc2
 src/cpu_map/x86_Snowridge.xml                 | 71 +++++++++++++++++++
397dc2
 .../x86_64-cpuid-Atom-P5362-guest.xml         | 28 ++------
397dc2
 .../x86_64-cpuid-Atom-P5362-json.xml          | 26 ++-----
397dc2
 .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml  |  1 +
397dc2
 .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml  |  1 +
397dc2
 tests/domaincapsdata/qemu_4.1.0.x86_64.xml    |  1 +
397dc2
 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |  1 +
397dc2
 .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |  1 +
397dc2
 tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |  1 +
397dc2
 .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml  |  1 +
397dc2
 .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml  |  1 +
397dc2
 tests/domaincapsdata/qemu_5.0.0.x86_64.xml    |  1 +
397dc2
 14 files changed, 92 insertions(+), 44 deletions(-)
397dc2
 create mode 100644 src/cpu_map/x86_Snowridge.xml
397dc2
397dc2
diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
397dc2
index aad4b410f9..1dd78c6715 100644
397dc2
--- a/src/cpu_map/Makefile.inc.am
397dc2
+++ b/src/cpu_map/Makefile.inc.am
397dc2
@@ -67,6 +67,7 @@ cpumap_DATA = \
397dc2
 	cpu_map/x86_Skylake-Server.xml \
397dc2
 	cpu_map/x86_Skylake-Server-IBRS.xml \
397dc2
 	cpu_map/x86_Skylake-Server-noTSX-IBRS.xml \
397dc2
+	cpu_map/x86_Snowridge.xml \
397dc2
 	cpu_map/x86_Westmere.xml \
397dc2
 	cpu_map/x86_Westmere-IBRS.xml \
397dc2
 	$(NULL)
397dc2
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
397dc2
index 633b017a93..2f58261e6d 100644
397dc2
--- a/src/cpu_map/index.xml
397dc2
+++ b/src/cpu_map/index.xml
397dc2
@@ -55,6 +55,7 @@
397dc2
     <include filename="x86_Icelake-Server.xml"/>
397dc2
     <include filename="x86_Icelake-Server-noTSX.xml"/>
397dc2
     <include filename="x86_Cooperlake.xml"/>
397dc2
+    <include filename='x86_Snowridge.xml'/>
397dc2
 
397dc2
     
397dc2
     <include filename="x86_athlon.xml"/>
397dc2
diff --git a/src/cpu_map/x86_Snowridge.xml b/src/cpu_map/x86_Snowridge.xml
397dc2
new file mode 100644
397dc2
index 0000000000..383a24d367
397dc2
--- /dev/null
397dc2
+++ b/src/cpu_map/x86_Snowridge.xml
397dc2
@@ -0,0 +1,71 @@
397dc2
+<cpus>
397dc2
+  <model name='Snowridge'>
397dc2
+    <decode host='on' guest='on'/>
397dc2
+    <signature family='6' model='134'/> 
397dc2
+    <vendor name='Intel'/>
397dc2
+    <feature name='3dnowprefetch'/>
397dc2
+    <feature name='aes'/>
397dc2
+    <feature name='apic'/>
397dc2
+    <feature name='arat'/>
397dc2
+    <feature name='arch-capabilities'/>
397dc2
+    <feature name='cldemote'/>
397dc2
+    <feature name='clflush'/>
397dc2
+    <feature name='clflushopt'/>
397dc2
+    <feature name='clwb'/>
397dc2
+    <feature name='cmov'/>
397dc2
+    <feature name='core-capability'/>
397dc2
+    <feature name='cx16'/>
397dc2
+    <feature name='cx8'/>
397dc2
+    <feature name='de'/>
397dc2
+    <feature name='erms'/>
397dc2
+    <feature name='fpu'/>
397dc2
+    <feature name='fsgsbase'/>
397dc2
+    <feature name='fxsr'/>
397dc2
+    <feature name='gfni'/>
397dc2
+    <feature name='lahf_lm'/>
397dc2
+    <feature name='lm'/>
397dc2
+    <feature name='mca'/>
397dc2
+    <feature name='mce'/>
397dc2
+    <feature name='mmx'/>
397dc2
+    <feature name='movbe'/>
397dc2
+    <feature name='movdir64b'/>
397dc2
+    <feature name='movdiri'/>
397dc2
+    <feature name='msr'/>
397dc2
+    <feature name='mtrr'/>
397dc2
+    <feature name='nx'/>
397dc2
+    <feature name='pae'/>
397dc2
+    <feature name='pat'/>
397dc2
+    <feature name='pclmuldq'/>
397dc2
+    <feature name='pdpe1gb'/>
397dc2
+    <feature name='pge'/>
397dc2
+    <feature name='pni'/>
397dc2
+    <feature name='popcnt'/>
397dc2
+    <feature name='pse'/>
397dc2
+    <feature name='pse36'/>
397dc2
+    <feature name='rdrand'/>
397dc2
+    <feature name='rdseed'/>
397dc2
+    <feature name='rdtscp'/>
397dc2
+    <feature name='sep'/>
397dc2
+    <feature name='sha-ni'/>
397dc2
+    <feature name='smap'/>
397dc2
+    <feature name='smep'/>
397dc2
+    <feature name='spec-ctrl'/>
397dc2
+    <feature name='split-lock-detect'/>
397dc2
+    <feature name='ssbd'/>
397dc2
+    <feature name='sse'/>
397dc2
+    <feature name='sse2'/>
397dc2
+    <feature name='sse4.1'/>
397dc2
+    <feature name='sse4.2'/>
397dc2
+    <feature name='ssse3'/>
397dc2
+    <feature name='syscall'/>
397dc2
+    <feature name='tsc'/>
397dc2
+    <feature name='tsc-deadline'/>
397dc2
+    <feature name='umip'/>
397dc2
+    <feature name='vme'/>
397dc2
+    <feature name='x2apic'/>
397dc2
+    <feature name='xgetbv1'/>
397dc2
+    <feature name='xsave'/>
397dc2
+    <feature name='xsavec'/>
397dc2
+    <feature name='xsaveopt'/>
397dc2
+  </model>
397dc2
+</cpus>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
index 2eeff136c4..f28e70b9e0 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
@@ -1,5 +1,5 @@
397dc2
 <cpu mode='custom' match='exact'>
397dc2
-  <model fallback='forbid'>IvyBridge-IBRS</model>
397dc2
+  <model fallback='forbid'>Snowridge</model>
397dc2
   <vendor>Intel</vendor>
397dc2
   <feature policy='require' name='ds'/>
397dc2
   <feature policy='require' name='acpi'/>
397dc2
@@ -16,36 +16,17 @@
397dc2
   <feature policy='require' name='tm2'/>
397dc2
   <feature policy='require' name='xtpr'/>
397dc2
   <feature policy='require' name='pdcm'/>
397dc2
-  <feature policy='require' name='movbe'/>
397dc2
   <feature policy='require' name='osxsave'/>
397dc2
-  <feature policy='require' name='arat'/>
397dc2
   <feature policy='require' name='tsc_adjust'/>
397dc2
   <feature policy='require' name='cmt'/>
397dc2
-  <feature policy='require' name='rdseed'/>
397dc2
-  <feature policy='require' name='smap'/>
397dc2
-  <feature policy='require' name='clflushopt'/>
397dc2
-  <feature policy='require' name='clwb'/>
397dc2
   <feature policy='require' name='intel-pt'/>
397dc2
-  <feature policy='require' name='sha-ni'/>
397dc2
-  <feature policy='require' name='umip'/>
397dc2
   <feature policy='require' name='waitpkg'/>
397dc2
-  <feature policy='require' name='gfni'/>
397dc2
   <feature policy='require' name='rdpid'/>
397dc2
-  <feature policy='require' name='cldemote'/>
397dc2
-  <feature policy='require' name='movdiri'/>
397dc2
-  <feature policy='require' name='movdir64b'/>
397dc2
   <feature policy='require' name='md-clear'/>
397dc2
   <feature policy='require' name='stibp'/>
397dc2
-  <feature policy='require' name='arch-capabilities'/>
397dc2
-  <feature policy='require' name='core-capability'/>
397dc2
-  <feature policy='require' name='ssbd'/>
397dc2
-  <feature policy='require' name='xsaveopt'/>
397dc2
-  <feature policy='require' name='xsavec'/>
397dc2
-  <feature policy='require' name='xgetbv1'/>
397dc2
   <feature policy='require' name='xsaves'/>
397dc2
   <feature policy='require' name='mbm_total'/>
397dc2
   <feature policy='require' name='mbm_local'/>
397dc2
-  <feature policy='require' name='3dnowprefetch'/>
397dc2
   <feature policy='require' name='invtsc'/>
397dc2
   <feature policy='require' name='rdctl-no'/>
397dc2
   <feature policy='require' name='ibrs-all'/>
397dc2
@@ -53,7 +34,8 @@
397dc2
   <feature policy='require' name='mds-no'/>
397dc2
   <feature policy='require' name='pschange-mc-no'/>
397dc2
   <feature policy='require' name='taa-no'/>
397dc2
-  <feature policy='require' name='split-lock-detect'/>
397dc2
-  <feature policy='disable' name='avx'/>
397dc2
-  <feature policy='disable' name='f16c'/>
397dc2
+  <feature policy='disable' name='mpx'/>
397dc2
+  <feature policy='disable' name='core-capability'/>
397dc2
+  <feature policy='disable' name='pdpe1gb'/>
397dc2
+  <feature policy='disable' name='split-lock-detect'/>
397dc2
 </cpu>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml
397dc2
index ca685d2f80..bbe0919706 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml
397dc2
@@ -1,33 +1,15 @@
397dc2
 <cpu mode='custom' match='exact'>
397dc2
-  <model fallback='forbid'>IvyBridge-IBRS</model>
397dc2
+  <model fallback='forbid'>Snowridge</model>
397dc2
   <vendor>Intel</vendor>
397dc2
   <feature policy='require' name='ss'/>
397dc2
   <feature policy='require' name='vmx'/>
397dc2
   <feature policy='require' name='pdcm'/>
397dc2
-  <feature policy='require' name='movbe'/>
397dc2
   <feature policy='require' name='hypervisor'/>
397dc2
-  <feature policy='require' name='arat'/>
397dc2
   <feature policy='require' name='tsc_adjust'/>
397dc2
-  <feature policy='require' name='rdseed'/>
397dc2
-  <feature policy='require' name='smap'/>
397dc2
-  <feature policy='require' name='clflushopt'/>
397dc2
-  <feature policy='require' name='clwb'/>
397dc2
-  <feature policy='require' name='sha-ni'/>
397dc2
-  <feature policy='require' name='umip'/>
397dc2
-  <feature policy='require' name='gfni'/>
397dc2
   <feature policy='require' name='rdpid'/>
397dc2
-  <feature policy='require' name='cldemote'/>
397dc2
-  <feature policy='require' name='movdiri'/>
397dc2
-  <feature policy='require' name='movdir64b'/>
397dc2
   <feature policy='require' name='md-clear'/>
397dc2
   <feature policy='require' name='stibp'/>
397dc2
-  <feature policy='require' name='arch-capabilities'/>
397dc2
-  <feature policy='require' name='ssbd'/>
397dc2
-  <feature policy='require' name='xsaveopt'/>
397dc2
-  <feature policy='require' name='xsavec'/>
397dc2
-  <feature policy='require' name='xgetbv1'/>
397dc2
   <feature policy='require' name='xsaves'/>
397dc2
-  <feature policy='require' name='3dnowprefetch'/>
397dc2
   <feature policy='require' name='ibpb'/>
397dc2
   <feature policy='require' name='amd-stibp'/>
397dc2
   <feature policy='require' name='amd-ssbd'/>
397dc2
@@ -36,6 +18,8 @@
397dc2
   <feature policy='require' name='skip-l1dfl-vmentry'/>
397dc2
   <feature policy='require' name='mds-no'/>
397dc2
   <feature policy='require' name='pschange-mc-no'/>
397dc2
-  <feature policy='disable' name='avx'/>
397dc2
-  <feature policy='disable' name='f16c'/>
397dc2
+  <feature policy='disable' name='mpx'/>
397dc2
+  <feature policy='disable' name='core-capability'/>
397dc2
+  <feature policy='disable' name='pdpe1gb'/>
397dc2
+  <feature policy='disable' name='split-lock-detect'/>
397dc2
 </cpu>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
397dc2
index f4ddb66e38..228acde33b 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml
397dc2
@@ -63,6 +63,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
       <model usable='yes'>Skylake-Client-IBRS</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
397dc2
index d6265ce243..bda1aba8ed 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml
397dc2
@@ -75,6 +75,7 @@
397dc2
       <model usable='yes'>athlon</model>
397dc2
       <model usable='no'>Westmere-IBRS</model>
397dc2
       <model usable='no'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
       <model usable='no'>Skylake-Client-IBRS</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.1.0.x86_64.xml b/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
397dc2
index bcc8bbcc7a..bb53138712 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.1.0.x86_64.xml
397dc2
@@ -62,6 +62,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
       <model usable='yes'>Skylake-Client-IBRS</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
397dc2
index 4d9616cb69..0a3f3ef564 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml
397dc2
@@ -64,6 +64,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
397dc2
index bcaf9afd6f..e64b647f51 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml
397dc2
@@ -75,6 +75,7 @@
397dc2
       <model usable='yes'>athlon</model>
397dc2
       <model usable='no'>Westmere-IBRS</model>
397dc2
       <model usable='no'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
397dc2
index 5210c917aa..5525758a48 100644
397dc2
--- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml
397dc2
@@ -63,6 +63,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
397dc2
index b2a7087a0e..4cb4bf6cce 100644
397dc2
--- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml
397dc2
@@ -64,6 +64,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
397dc2
index 39b11fb634..b5986404ae 100644
397dc2
--- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml
397dc2
@@ -74,6 +74,7 @@
397dc2
       <model usable='yes'>athlon</model>
397dc2
       <model usable='no'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
397dc2
index 3a1ee23302..0297ce600b 100644
397dc2
--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
397dc2
@@ -63,6 +63,7 @@
397dc2
       <model usable='no'>athlon</model>
397dc2
       <model usable='yes'>Westmere-IBRS</model>
397dc2
       <model usable='yes'>Westmere</model>
397dc2
+      <model usable='no'>Snowridge</model>
397dc2
       <model usable='no'>Skylake-Server-noTSX-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server-IBRS</model>
397dc2
       <model usable='no'>Skylake-Server</model>
397dc2
-- 
397dc2
2.30.0
397dc2