render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
397dc2
From f441299f1b589a60199156a217c5f49fc9de954d Mon Sep 17 00:00:00 2001
397dc2
Message-Id: <f441299f1b589a60199156a217c5f49fc9de954d@dist-git>
397dc2
From: Markus Schade <markus.schade@hetzner.com>
397dc2
Date: Thu, 8 Oct 2020 18:01:25 +0200
397dc2
Subject: [PATCH] cpu_map: Defined and enable EPYC-Rome model
397dc2
MIME-Version: 1.0
397dc2
Content-Type: text/plain; charset=UTF-8
397dc2
Content-Transfer-Encoding: 8bit
397dc2
397dc2
Signed-off-by: Markus Schade <markus.schade@hetzner.com>
397dc2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
(cherry picked from commit f941639f86f4bc66c106eb1291f1b58cf9e24680)
397dc2
397dc2
https://bugzilla.redhat.com/show_bug.cgi?id=1861506
397dc2
397dc2
Conflicts:
397dc2
	src/cpu_map/meson.build
397dc2
            - the corresponding change was applied to Makefile.inc.am as
397dc2
              downstream still uses autotools
397dc2
397dc2
	tests/cputest.c
397dc2
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-host.xml
397dc2
            - test data for Ryzen 9 3900X are not present downstream
397dc2
397dc2
	tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
397dc2
	tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
397dc2
	tests/domaincapsdata/qemu_5.1.0.x86_64.xml
397dc2
	tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml
397dc2
	tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml
397dc2
	tests/domaincapsdata/qemu_5.2.0.x86_64.xml
397dc2
            - not present downstream
397dc2
397dc2
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
Message-Id: <bc87b8a0b0c408f380792eaf63ff07551185d3a5.1602172344.git.jdenemar@redhat.com>
397dc2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
397dc2
---
397dc2
 src/cpu_map/Makefile.inc.am                   |  1 +
397dc2
 src/cpu_map/index.xml                         |  1 +
397dc2
 src/cpu_map/x86_EPYC-Rome.xml                 | 84 +++++++++++++++++++
397dc2
 .../x86_64-cpuid-EPYC-7502-32-Core-guest.xml  | 12 +--
397dc2
 .../x86_64-cpuid-EPYC-7502-32-Core-host.xml   | 12 +--
397dc2
 .../x86_64-cpuid-EPYC-7502-32-Core-json.xml   | 12 +--
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
 9 files changed, 92 insertions(+), 33 deletions(-)
397dc2
 create mode 100644 src/cpu_map/x86_EPYC-Rome.xml
397dc2
397dc2
diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
397dc2
index b949cb0bea..aad4b410f9 100644
397dc2
--- a/src/cpu_map/Makefile.inc.am
397dc2
+++ b/src/cpu_map/Makefile.inc.am
397dc2
@@ -30,6 +30,7 @@ cpumap_DATA = \
397dc2
 	cpu_map/x86_Dhyana.xml \
397dc2
 	cpu_map/x86_EPYC.xml \
397dc2
 	cpu_map/x86_EPYC-IBPB.xml \
397dc2
+	cpu_map/x86_EPYC-Rome.xml \
397dc2
 	cpu_map/x86_Haswell.xml \
397dc2
 	cpu_map/x86_Haswell-IBRS.xml \
397dc2
 	cpu_map/x86_Haswell-noTSX.xml \
397dc2
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
397dc2
index ff1da2e677..633b017a93 100644
397dc2
--- a/src/cpu_map/index.xml
397dc2
+++ b/src/cpu_map/index.xml
397dc2
@@ -66,6 +66,7 @@
397dc2
     <include filename="x86_Opteron_G5.xml"/>
397dc2
     <include filename="x86_EPYC.xml"/>
397dc2
     <include filename="x86_EPYC-IBPB.xml"/>
397dc2
+    <include filename="x86_EPYC-Rome.xml"/>
397dc2
 
397dc2
     
397dc2
     <include filename="x86_Dhyana.xml"/>
397dc2
diff --git a/src/cpu_map/x86_EPYC-Rome.xml b/src/cpu_map/x86_EPYC-Rome.xml
397dc2
new file mode 100644
397dc2
index 0000000000..99fc015fdd
397dc2
--- /dev/null
397dc2
+++ b/src/cpu_map/x86_EPYC-Rome.xml
397dc2
@@ -0,0 +1,84 @@
397dc2
+<cpus>
397dc2
+  <model name='EPYC-Rome'>
397dc2
+    <decode host='on' guest='on'/>
397dc2
+    <signature family='23' model='49'/>
397dc2
+    <vendor name='AMD'/>
397dc2
+    <feature name='3dnowprefetch'/>
397dc2
+    <feature name='abm'/>
397dc2
+    <feature name='adx'/>
397dc2
+    <feature name='aes'/>
397dc2
+    <feature name='amd-stibp'/>
397dc2
+    <feature name='apic'/>
397dc2
+    <feature name='arat'/>
397dc2
+    <feature name='avx'/>
397dc2
+    <feature name='avx2'/>
397dc2
+    <feature name='bmi1'/>
397dc2
+    <feature name='bmi2'/>
397dc2
+    <feature name='clflush'/>
397dc2
+    <feature name='clflushopt'/>
397dc2
+    <feature name='clwb'/>
397dc2
+    <feature name='clzero'/>
397dc2
+    <feature name='cmov'/>
397dc2
+    <feature name='cr8legacy'/>
397dc2
+    <feature name='cx16'/>
397dc2
+    <feature name='cx8'/>
397dc2
+    <feature name='de'/>
397dc2
+    <feature name='f16c'/>
397dc2
+    <feature name='fma'/>
397dc2
+    <feature name='fpu'/>
397dc2
+    <feature name='fsgsbase'/>
397dc2
+    <feature name='fxsr'/>
397dc2
+    <feature name='fxsr_opt'/>
397dc2
+    <feature name='ibpb'/>
397dc2
+    <feature name='lahf_lm'/>
397dc2
+    <feature name='lm'/>
397dc2
+    <feature name='mca'/>
397dc2
+    <feature name='mce'/>
397dc2
+    <feature name='misalignsse'/>
397dc2
+    <feature name='mmx'/>
397dc2
+    <feature name='mmxext'/>
397dc2
+    <feature name='monitor'/>
397dc2
+    <feature name='movbe'/>
397dc2
+    <feature name='msr'/>
397dc2
+    <feature name='mtrr'/>
397dc2
+    <feature name='npt'/>
397dc2
+    <feature name='nrip-save'/>
397dc2
+    <feature name='nx'/>
397dc2
+    <feature name='osvw'/>
397dc2
+    <feature name='pae'/>
397dc2
+    <feature name='pat'/>
397dc2
+    <feature name='pclmuldq'/>
397dc2
+    <feature name='pdpe1gb'/>
397dc2
+    <feature name='perfctr_core'/>
397dc2
+    <feature name='pge'/>
397dc2
+    <feature name='pni'/>
397dc2
+    <feature name='popcnt'/>
397dc2
+    <feature name='pse'/>
397dc2
+    <feature name='pse36'/>
397dc2
+    <feature name='rdpid'/>
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='sse'/>
397dc2
+    <feature name='sse2'/>
397dc2
+    <feature name='sse4.1'/>
397dc2
+    <feature name='sse4.2'/>
397dc2
+    <feature name='sse4a'/>
397dc2
+    <feature name='ssse3'/>
397dc2
+    <feature name='svm'/>
397dc2
+    <feature name='syscall'/>
397dc2
+    <feature name='tsc'/>
397dc2
+    <feature name='umip'/>
397dc2
+    <feature name='vme'/>
397dc2
+    <feature name='wbnoinvd'/>
397dc2
+    <feature name='xgetbv1'/>
397dc2
+    <feature name='xsave'/>
397dc2
+    <feature name='xsavec'/>
397dc2
+    <feature name='xsaveerptr'/>
397dc2
+    <feature name='xsaveopt'/>
397dc2
+  </model>
397dc2
+</cpus>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
397dc2
index 1320f65a58..cb2caab6f5 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
397dc2
@@ -1,12 +1,9 @@
397dc2
 <cpu mode='custom' match='exact'>
397dc2
-  <model fallback='forbid'>EPYC-IBPB</model>
397dc2
+  <model fallback='forbid'>EPYC-Rome</model>
397dc2
   <vendor>AMD</vendor>
397dc2
   <feature policy='require' name='ht'/>
397dc2
   <feature policy='require' name='osxsave'/>
397dc2
   <feature policy='require' name='cmt'/>
397dc2
-  <feature policy='require' name='clwb'/>
397dc2
-  <feature policy='require' name='umip'/>
397dc2
-  <feature policy='require' name='rdpid'/>
397dc2
   <feature policy='require' name='xsaves'/>
397dc2
   <feature policy='require' name='mbm_total'/>
397dc2
   <feature policy='require' name='mbm_local'/>
397dc2
@@ -17,18 +14,11 @@
397dc2
   <feature policy='require' name='wdt'/>
397dc2
   <feature policy='require' name='tce'/>
397dc2
   <feature policy='require' name='topoext'/>
397dc2
-  <feature policy='require' name='perfctr_core'/>
397dc2
   <feature policy='require' name='perfctr_nb'/>
397dc2
   <feature policy='require' name='invtsc'/>
397dc2
-  <feature policy='require' name='clzero'/>
397dc2
-  <feature policy='require' name='xsaveerptr'/>
397dc2
-  <feature policy='require' name='wbnoinvd'/>
397dc2
-  <feature policy='require' name='amd-stibp'/>
397dc2
   <feature policy='require' name='amd-ssbd'/>
397dc2
-  <feature policy='require' name='npt'/>
397dc2
   <feature policy='require' name='lbrv'/>
397dc2
   <feature policy='require' name='svm-lock'/>
397dc2
-  <feature policy='require' name='nrip-save'/>
397dc2
   <feature policy='require' name='tsc-scale'/>
397dc2
   <feature policy='require' name='vmcb-clean'/>
397dc2
   <feature policy='require' name='flushbyasid'/>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
397dc2
index 37905ec812..b6784f9eba 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
397dc2
@@ -1,13 +1,10 @@
397dc2
 <cpu>
397dc2
   <arch>x86_64</arch>
397dc2
-  <model>EPYC-IBPB</model>
397dc2
+  <model>EPYC-Rome</model>
397dc2
   <vendor>AMD</vendor>
397dc2
   <feature name='ht'/>
397dc2
   <feature name='osxsave'/>
397dc2
   <feature name='cmt'/>
397dc2
-  <feature name='clwb'/>
397dc2
-  <feature name='umip'/>
397dc2
-  <feature name='rdpid'/>
397dc2
   <feature name='xsaves'/>
397dc2
   <feature name='mbm_total'/>
397dc2
   <feature name='mbm_local'/>
397dc2
@@ -18,18 +15,11 @@
397dc2
   <feature name='wdt'/>
397dc2
   <feature name='tce'/>
397dc2
   <feature name='topoext'/>
397dc2
-  <feature name='perfctr_core'/>
397dc2
   <feature name='perfctr_nb'/>
397dc2
   <feature name='invtsc'/>
397dc2
-  <feature name='clzero'/>
397dc2
-  <feature name='xsaveerptr'/>
397dc2
-  <feature name='wbnoinvd'/>
397dc2
-  <feature name='amd-stibp'/>
397dc2
   <feature name='amd-ssbd'/>
397dc2
-  <feature name='npt'/>
397dc2
   <feature name='lbrv'/>
397dc2
   <feature name='svm-lock'/>
397dc2
-  <feature name='nrip-save'/>
397dc2
   <feature name='tsc-scale'/>
397dc2
   <feature name='vmcb-clean'/>
397dc2
   <feature name='flushbyasid'/>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-json.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-json.xml
397dc2
index 225cf63852..86466c0547 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-json.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-json.xml
397dc2
@@ -1,28 +1,18 @@
397dc2
 <cpu mode='custom' match='exact'>
397dc2
-  <model fallback='forbid'>EPYC-IBPB</model>
397dc2
+  <model fallback='forbid'>EPYC-Rome</model>
397dc2
   <vendor>AMD</vendor>
397dc2
   <feature policy='require' name='x2apic'/>
397dc2
   <feature policy='require' name='tsc-deadline'/>
397dc2
   <feature policy='require' name='hypervisor'/>
397dc2
   <feature policy='require' name='tsc_adjust'/>
397dc2
-  <feature policy='require' name='clwb'/>
397dc2
-  <feature policy='require' name='umip'/>
397dc2
-  <feature policy='require' name='rdpid'/>
397dc2
   <feature policy='require' name='spec-ctrl'/>
397dc2
   <feature policy='require' name='stibp'/>
397dc2
   <feature policy='require' name='arch-capabilities'/>
397dc2
   <feature policy='require' name='ssbd'/>
397dc2
   <feature policy='require' name='xsaves'/>
397dc2
   <feature policy='require' name='cmp_legacy'/>
397dc2
-  <feature policy='require' name='perfctr_core'/>
397dc2
-  <feature policy='require' name='clzero'/>
397dc2
-  <feature policy='require' name='xsaveerptr'/>
397dc2
-  <feature policy='require' name='wbnoinvd'/>
397dc2
-  <feature policy='require' name='amd-stibp'/>
397dc2
   <feature policy='require' name='amd-ssbd'/>
397dc2
   <feature policy='require' name='virt-ssbd'/>
397dc2
-  <feature policy='require' name='npt'/>
397dc2
-  <feature policy='require' name='nrip-save'/>
397dc2
   <feature policy='require' name='rdctl-no'/>
397dc2
   <feature policy='require' name='skip-l1dfl-vmentry'/>
397dc2
   <feature policy='require' name='mds-no'/>
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 7bfd786ff6..b2a7087a0e 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
@@ -90,6 +90,7 @@
397dc2
       <model usable='yes'>Haswell-noTSX</model>
397dc2
       <model usable='yes'>Haswell-IBRS</model>
397dc2
       <model usable='yes'>Haswell</model>
397dc2
+      <model usable='no'>EPYC-Rome</model>
397dc2
       <model usable='no'>EPYC-IBPB</model>
397dc2
       <model usable='no'>EPYC</model>
397dc2
       <model usable='no'>Dhyana</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 eb456dea28..39b11fb634 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
@@ -100,6 +100,7 @@
397dc2
       <model usable='no'>Haswell-noTSX</model>
397dc2
       <model usable='no'>Haswell-IBRS</model>
397dc2
       <model usable='no'>Haswell</model>
397dc2
+      <model usable='no'>EPYC-Rome</model>
397dc2
       <model usable='no'>EPYC-IBPB</model>
397dc2
       <model usable='no'>EPYC</model>
397dc2
       <model usable='no'>Dhyana</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 d6ee66ab60..3a1ee23302 100644
397dc2
--- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
397dc2
+++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml
397dc2
@@ -89,6 +89,7 @@
397dc2
       <model usable='yes'>Haswell-noTSX</model>
397dc2
       <model usable='yes'>Haswell-IBRS</model>
397dc2
       <model usable='yes'>Haswell</model>
397dc2
+      <model usable='no'>EPYC-Rome</model>
397dc2
       <model usable='no'>EPYC-IBPB</model>
397dc2
       <model usable='no'>EPYC</model>
397dc2
       <model usable='no'>Dhyana</model>
397dc2
-- 
397dc2
2.29.2
397dc2