render / rpms / libvirt

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