render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
79b470
From 1d6a30efa98fc0cf39725792efae1a151797589f Mon Sep 17 00:00:00 2001
79b470
Message-Id: <1d6a30efa98fc0cf39725792efae1a151797589f@dist-git>
79b470
From: Jiri Denemark <jdenemar@redhat.com>
79b470
Date: Thu, 8 Oct 2020 18:01:22 +0200
79b470
Subject: [PATCH] cpu_map: Add missing x86 features in 0x80000008 CPUID leaf
79b470
MIME-Version: 1.0
79b470
Content-Type: text/plain; charset=UTF-8
79b470
Content-Transfer-Encoding: 8bit
79b470
79b470
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
79b470
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
79b470
(cherry picked from commit 892b7c70f66abc511e1251382c9183493024f253)
79b470
79b470
https://bugzilla.redhat.com/show_bug.cgi?id=1861506
79b470
79b470
Conflicts:
79b470
	tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml
79b470
	tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml
79b470
	tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml
79b470
            - commit df69263c26 (cpu_map: Request test files update when
79b470
              adding x86 features) not backported
79b470
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-disabled.xml
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-enabled.xml
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-guest.xml
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-host.xml
79b470
	tests/cputestdata/x86_64-cpuid-Ryzen-9-3900X-12-Core-json.xml
79b470
	tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
79b470
	tests/domaincapsdata/qemu_5.1.0.x86_64.xml
79b470
            - not present downstream
79b470
79b470
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
79b470
Message-Id: <27effeb5e12252982411796bd72e078d3afe49cb.1602172344.git.jdenemar@redhat.com>
79b470
Reviewed-by: Ján Tomko <jtomko@redhat.com>
79b470
---
79b470
 src/cpu_map/x86_features.xml                                | 6 ++++++
79b470
 tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml       | 2 +-
79b470
 tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml          | 1 +
79b470
 .../cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml | 1 +
79b470
 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml  | 1 +
79b470
 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml   | 1 +
79b470
 .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml        | 1 +
79b470
 .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml           | 1 +
79b470
 .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml            | 1 +
79b470
 .../x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml        | 1 +
79b470
 .../x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml           | 1 +
79b470
 .../x86_64-cpuid-Hygon-C86-7185-32-core-host.xml            | 1 +
79b470
 .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml      | 1 +
79b470
 .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml         | 1 +
79b470
 .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml          | 1 +
79b470
 15 files changed, 20 insertions(+), 1 deletion(-)
79b470
79b470
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
79b470
index 364e45fb32..5265b2989b 100644
79b470
--- a/src/cpu_map/x86_features.xml
79b470
+++ b/src/cpu_map/x86_features.xml
79b470
@@ -486,12 +486,18 @@
79b470
   <feature name='clzero'>
79b470
     <cpuid eax_in='0x80000008' ebx='0x00000001'/>
79b470
   </feature>
79b470
+  <feature name='xsaveerptr'>
79b470
+    <cpuid eax_in='0x80000008' ebx='0x00000004'/>
79b470
+  </feature>
79b470
   <feature name='wbnoinvd'>
79b470
     <cpuid eax_in='0x80000008' ebx='0x00000200'/>
79b470
   </feature>
79b470
   <feature name='ibpb'>
79b470
     <cpuid eax_in='0x80000008' ebx='0x00001000'/>
79b470
   </feature>
79b470
+  <feature name='amd-stibp'>
79b470
+    <cpuid eax_in='0x80000008' ebx='0x00008000'/>
79b470
+  </feature>
79b470
   <feature name='amd-ssbd'>
79b470
     <cpuid eax_in='0x80000008' ebx='0x01000000'/>
79b470
   </feature>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml b/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml
79b470
index 2d7f83c80f..1d91c3efa8 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml
79b470
@@ -6,6 +6,6 @@
79b470
   <cpuid eax_in='0x00000007' ecx_in='0x01' eax='0x00000020' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x0000000f' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000121' edx='0x2c100800'/>
79b470
-  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x01001000' ecx='0x00000000' edx='0x00000000'/>
79b470
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x01009000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <msr index='0x10a' edx='0x00000000' eax='0x000001eb'/>
79b470
 </cpudata>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml b/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml
79b470
index fb319d547c..c89e0e5350 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml
79b470
@@ -10,6 +10,7 @@
79b470
   <feature policy='require' name='md-clear'/>
79b470
   <feature policy='require' name='xsaves'/>
79b470
   <feature policy='require' name='ibpb'/>
79b470
+  <feature policy='require' name='amd-stibp'/>
79b470
   <feature policy='require' name='amd-ssbd'/>
79b470
   <feature policy='require' name='tsx-ctrl'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml
79b470
index 747d725acf..c26c9c7be3 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-disabled.xml
79b470
@@ -4,4 +4,5 @@
79b470
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01c2300c' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
79b470
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000005' ecx='0x00000000' edx='0x00000000'/>
79b470
 </cpudata>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml
79b470
index b75196aac5..612e571609 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml
79b470
@@ -14,4 +14,5 @@
79b470
   <feature policy='require' name='perfctr_nb'/>
79b470
   <feature policy='require' name='invtsc'/>
79b470
   <feature policy='require' name='clzero'/>
79b470
+  <feature policy='require' name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml
79b470
index fd84b526db..7498d924e2 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml
79b470
@@ -15,4 +15,5 @@
79b470
   <feature name='perfctr_nb'/>
79b470
   <feature name='invtsc'/>
79b470
   <feature name='clzero'/>
79b470
+  <feature name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml
79b470
index af43fca98d..a7f4fa3f01 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml
79b470
@@ -4,4 +4,5 @@
79b470
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01c2300c' edx='0x08000000'/>
79b470
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
79b470
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000005' ecx='0x00000000' edx='0x00000000'/>
79b470
 </cpudata>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml
79b470
index 5044c8cc35..96fdea306f 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml
79b470
@@ -14,5 +14,6 @@
79b470
   <feature policy='require' name='perfctr_nb'/>
79b470
   <feature policy='require' name='invtsc'/>
79b470
   <feature policy='require' name='clzero'/>
79b470
+  <feature policy='require' name='xsaveerptr'/>
79b470
   <feature policy='disable' name='rdtscp'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml
79b470
index d7d5ce88d9..4fff74f3aa 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml
79b470
@@ -15,4 +15,5 @@
79b470
   <feature name='perfctr_nb'/>
79b470
   <feature name='invtsc'/>
79b470
   <feature name='clzero'/>
79b470
+  <feature name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml
79b470
index 747d725acf..c26c9c7be3 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml
79b470
@@ -4,4 +4,5 @@
79b470
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01c2300c' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
79b470
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000005' ecx='0x00000000' edx='0x00000000'/>
79b470
 </cpudata>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml
79b470
index 75c71233c6..844b8b9d4f 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml
79b470
@@ -14,4 +14,5 @@
79b470
   <feature policy='require' name='perfctr_nb'/>
79b470
   <feature policy='require' name='invtsc'/>
79b470
   <feature policy='require' name='clzero'/>
79b470
+  <feature policy='require' name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml
79b470
index 82f28067c4..3d1b143eba 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml
79b470
@@ -15,4 +15,5 @@
79b470
   <feature name='perfctr_nb'/>
79b470
   <feature name='invtsc'/>
79b470
   <feature name='clzero'/>
79b470
+  <feature name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml
79b470
index b085050618..0358ecf478 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-disabled.xml
79b470
@@ -5,4 +5,5 @@
79b470
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x01c23008' edx='0x00000000'/>
79b470
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
79b470
+  <cpuid eax_in='0x80000008' ecx_in='0x00' eax='0x00000000' ebx='0x00000005' ecx='0x00000000' edx='0x00000000'/>
79b470
 </cpudata>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml
79b470
index b75196aac5..612e571609 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml
79b470
@@ -14,4 +14,5 @@
79b470
   <feature policy='require' name='perfctr_nb'/>
79b470
   <feature policy='require' name='invtsc'/>
79b470
   <feature policy='require' name='clzero'/>
79b470
+  <feature policy='require' name='xsaveerptr'/>
79b470
 </cpu>
79b470
diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml
79b470
index fd84b526db..7498d924e2 100644
79b470
--- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml
79b470
+++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml
79b470
@@ -15,4 +15,5 @@
79b470
   <feature name='perfctr_nb'/>
79b470
   <feature name='invtsc'/>
79b470
   <feature name='clzero'/>
79b470
+  <feature name='xsaveerptr'/>
79b470
 </cpu>
79b470
-- 
79b470
2.29.2
79b470