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