c313de
From 0c781b84fe81ca2d4865e92d6c22dafcea62261c Mon Sep 17 00:00:00 2001
c313de
Message-Id: <0c781b84fe81ca2d4865e92d6c22dafcea62261c@dist-git>
c313de
From: Jiri Denemark <jdenemar@redhat.com>
c313de
Date: Fri, 21 Jun 2019 09:26:10 +0200
c313de
Subject: [PATCH] cpu_map: Introduce IA32_ARCH_CAPABILITIES MSR features
c313de
MIME-Version: 1.0
c313de
Content-Type: text/plain; charset=UTF-8
c313de
Content-Transfer-Encoding: 8bit
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
(cherry picked from commit c8ec678fd9d97189667c0121f48a220dd26856b7)
c313de
c313de
https://bugzilla.redhat.com/show_bug.cgi?id=1697627
c313de
c313de
Conflicts:
c313de
	src/cpu_map/x86_features.xml
c313de
            - cpu_map XML is not split downstream
c313de
c313de
	tests/domaincapsschemadata/qemu_3.1.0.x86_64.xml
c313de
	tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml
c313de
            - missing
c313de
c313de
	tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml
c313de
            - commit 4586b11bed9bc59ea749e28f522bf5e0b462c4c7 not
c313de
              backported
c313de
c313de
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c313de
Message-Id: <acddba8b7464f063de46f04fc421319cc78ad86c.1561068591.git.jdenemar@redhat.com>
c313de
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c313de
---
c313de
 src/cpu/cpu_map.xml                           | 20 +++++++++++++++++++
c313de
 .../x86_64-cpuid-Core-i7-7600U-enabled.xml    |  1 +
c313de
 .../x86_64-cpuid-Core-i7-7600U-json.xml       |  1 +
c313de
 ...86_64-cpuid-Xeon-Platinum-8268-enabled.xml |  1 +
c313de
 .../x86_64-cpuid-Xeon-Platinum-8268-guest.xml |  4 ++++
c313de
 .../x86_64-cpuid-Xeon-Platinum-8268-host.xml  |  4 ++++
c313de
 .../x86_64-cpuid-Xeon-Platinum-8268-json.xml  |  3 +++
c313de
 .../qemu_4.1.0.x86_64.xml                     |  1 +
c313de
 8 files changed, 35 insertions(+)
c313de
c313de
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
c313de
index 9b289556e8..acd9dad7dc 100644
c313de
--- a/src/cpu/cpu_map.xml
c313de
+++ b/src/cpu/cpu_map.xml
c313de
@@ -482,6 +482,26 @@
c313de
       <cpuid eax_in='0x80000008' ebx='0x02000000'/>
c313de
     </feature>
c313de
 
c313de
+    
c313de
+    <feature name='rdctl-no'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000001'/>
c313de
+    </feature>
c313de
+    <feature name='ibrs-all'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000002'/>
c313de
+    </feature>
c313de
+    <feature name='rsba'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000004'/>
c313de
+    </feature>
c313de
+    <feature name='skip-l1dfl-vmentry'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000008'/>
c313de
+    </feature>
c313de
+    <feature name='ssb-no'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000010'/>
c313de
+    </feature>
c313de
+    <feature name='mds-no'>
c313de
+      <msr index='0x10a' edx='0x00000000' eax='0x00000020'/>
c313de
+    </feature>
c313de
+
c313de
     
c313de
     <model name='486'>
c313de
       <feature name='fpu'/>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-enabled.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-enabled.xml
c313de
index b1cdaa802a..58bc84577c 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-enabled.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-enabled.xml
c313de
@@ -5,4 +5,5 @@
c313de
   <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x009c4fbb' ecx='0x00000004' edx='0x84000000'/>
c313de
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x0000000f' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
c313de
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000121' edx='0x2c100800'/>
c313de
+  <msr index='0x10a' edx='0x00000000' eax='0x00000008'/>
c313de
 </cpudata>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml
c313de
index 48089c6003..690081493b 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml
c313de
@@ -10,4 +10,5 @@
c313de
   <feature policy='require' name='ssbd'/>
c313de
   <feature policy='require' name='xsaves'/>
c313de
   <feature policy='require' name='pdpe1gb'/>
c313de
+  <feature policy='require' name='skip-l1dfl-vmentry'/>
c313de
 </cpu>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-enabled.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-enabled.xml
c313de
index 434ac1956a..313009b156 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-enabled.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-enabled.xml
c313de
@@ -5,4 +5,5 @@
c313de
   <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0xd19f4fbb' ecx='0x0000080c' edx='0x84000000'/>
c313de
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x0000000f' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
c313de
   <cpuid eax_in='0x80000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000121' edx='0x2c100800'/>
c313de
+  <msr index='0x10a' edx='0x00000000' eax='0x0000000b'/>
c313de
 </cpudata>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml
c313de
index c7e8a1fccf..988fb1dbdc 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml
c313de
@@ -30,4 +30,8 @@
c313de
   <feature policy='require' name='mbm_total'/>
c313de
   <feature policy='require' name='mbm_local'/>
c313de
   <feature policy='require' name='invtsc'/>
c313de
+  <feature policy='require' name='rdctl-no'/>
c313de
+  <feature policy='require' name='ibrs-all'/>
c313de
+  <feature policy='require' name='skip-l1dfl-vmentry'/>
c313de
+  <feature policy='require' name='mds-no'/>
c313de
 </cpu>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml
c313de
index d7482751b4..fdeafc4870 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml
c313de
@@ -31,4 +31,8 @@
c313de
   <feature name='mbm_total'/>
c313de
   <feature name='mbm_local'/>
c313de
   <feature name='invtsc'/>
c313de
+  <feature name='rdctl-no'/>
c313de
+  <feature name='ibrs-all'/>
c313de
+  <feature name='skip-l1dfl-vmentry'/>
c313de
+  <feature name='mds-no'/>
c313de
 </cpu>
c313de
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-json.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-json.xml
c313de
index b7d12dced7..78863c61d1 100644
c313de
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-json.xml
c313de
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-json.xml
c313de
@@ -7,4 +7,7 @@
c313de
   <feature policy='require' name='umip'/>
c313de
   <feature policy='require' name='pku'/>
c313de
   <feature policy='require' name='xsaves'/>
c313de
+  <feature policy='require' name='rdctl-no'/>
c313de
+  <feature policy='require' name='ibrs-all'/>
c313de
+  <feature policy='require' name='skip-l1dfl-vmentry'/>
c313de
 </cpu>
c313de
diff --git a/tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml b/tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml
c313de
index 47aed6a43a..63ae7957c4 100644
c313de
--- a/tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml
c313de
+++ b/tests/domaincapsschemadata/qemu_4.1.0.x86_64.xml
c313de
@@ -34,6 +34,7 @@
c313de
       <feature policy='require' name='arch-capabilities'/>
c313de
       <feature policy='require' name='xsaves'/>
c313de
       <feature policy='require' name='pdpe1gb'/>
c313de
+      <feature policy='require' name='skip-l1dfl-vmentry'/>
c313de
     </mode>
c313de
     <mode name='custom' supported='yes'>
c313de
       <model usable='yes'>qemu64</model>
c313de
-- 
c313de
2.22.0
c313de