render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
982648
From 5d335dc7f64e2bd394c1bf86c6e5582fd859857a Mon Sep 17 00:00:00 2001
982648
Message-Id: <5d335dc7f64e2bd394c1bf86c6e5582fd859857a@dist-git>
982648
From: Paolo Bonzini <pbonzini@redhat.com>
982648
Date: Tue, 12 Dec 2017 16:23:42 +0100
982648
Subject: [PATCH] RHEL: cpu: Add downstream only CPU features for CVE-2017-5715
982648
982648
RHEL-only: The downstream patches for CVE-2017-5715 contained more CPU
982648
features than what was eventually pushed upstream. We need to keep them
982648
included for backward compatibility.
982648
982648
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
982648
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
982648
---
982648
 src/cpu/cpu_map.xml                                         | 6 ++++++
982648
 .../x86_64-cpuid-Core-i7-5600U-ibrs-disabled.xml            | 2 +-
982648
 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-host.xml  | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml | 2 +-
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-guest.xml    | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-host.xml     | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml | 2 +-
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-guest.xml    | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-host.xml     | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-disabled.xml  | 2 +-
982648
 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml     | 1 +
982648
 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml      | 1 +
982648
 13 files changed, 18 insertions(+), 4 deletions(-)
982648
982648
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
982648
index 96daa0f9af..f1f8048c14 100644
982648
--- a/src/cpu/cpu_map.xml
982648
+++ b/src/cpu/cpu_map.xml
982648
@@ -298,6 +298,12 @@
982648
     <feature name='spec-ctrl'>
982648
       <cpuid eax_in='0x07' ecx_in='0x00' edx='0x04000000'/>
982648
     </feature>
982648
+    <feature name='stibp'>
982648
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
982648
+    </feature>
982648
+    <feature name='arch-facilities'>
982648
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
982648
+    </feature>
982648
     <feature name='ssbd'>
982648
       <cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
982648
     </feature>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-disabled.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-disabled.xml
982648
index e033bb141f..5c9cfa9bd6 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-disabled.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-disabled.xml
982648
@@ -1,6 +1,6 @@
982648
 
982648
 <cpudata arch='x86'>
982648
   <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0800c1dc' edx='0xb0600000'/>
982648
-  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x04000000'/>
982648
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x0c000000'/>
982648
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
982648
 </cpudata>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml
982648
index a70cb6d46a..538bfe16ab 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-guest.xml
982648
@@ -22,6 +22,7 @@
982648
   <feature policy='require' name='rdrand'/>
982648
   <feature policy='require' name='arat'/>
982648
   <feature policy='require' name='tsc_adjust'/>
982648
+  <feature policy='require' name='stibp'/>
982648
   <feature policy='require' name='xsaveopt'/>
982648
   <feature policy='require' name='pdpe1gb'/>
982648
   <feature policy='require' name='abm'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-host.xml b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-host.xml
982648
index b8e3399103..004423ee57 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-host.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Core-i7-5600U-ibrs-host.xml
982648
@@ -23,6 +23,7 @@
982648
   <feature name='rdrand'/>
982648
   <feature name='arat'/>
982648
   <feature name='tsc_adjust'/>
982648
+  <feature name='stibp'/>
982648
   <feature name='xsaveopt'/>
982648
   <feature name='pdpe1gb'/>
982648
   <feature name='abm'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml
982648
index aacc7a2b14..ec299652f7 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-disabled.xml
982648
@@ -1,6 +1,6 @@
982648
 
982648
 <cpudata arch='x86'>
982648
   <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
982648
-  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000000' edx='0x00000000'/>
982648
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000000' edx='0x08000000'/>
982648
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
982648
 </cpudata>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-guest.xml
982648
index a66c7a5644..d8aaaad29d 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-guest.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-guest.xml
982648
@@ -24,6 +24,7 @@
982648
   <feature policy='require' name='arat'/>
982648
   <feature policy='require' name='tsc_adjust'/>
982648
   <feature policy='require' name='cmt'/>
982648
+  <feature policy='require' name='stibp'/>
982648
   <feature policy='require' name='xsaveopt'/>
982648
   <feature policy='require' name='pdpe1gb'/>
982648
   <feature policy='require' name='abm'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-host.xml
982648
index 624d71db20..9bac4b4648 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-host.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3-host.xml
982648
@@ -25,6 +25,7 @@
982648
   <feature name='arat'/>
982648
   <feature name='tsc_adjust'/>
982648
   <feature name='cmt'/>
982648
+  <feature name='stibp'/>
982648
   <feature name='xsaveopt'/>
982648
   <feature name='pdpe1gb'/>
982648
   <feature name='abm'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml
982648
index d904808cec..85369d755c 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-disabled.xml
982648
@@ -1,7 +1,7 @@
982648
 
982648
 <cpudata arch='x86'>
982648
   <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
982648
-  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000000' edx='0x00000000'/>
982648
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000000' edx='0x08000000'/>
982648
   <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
982648
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
982648
 </cpudata>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-guest.xml
982648
index 60609f5c70..d4f303ecce 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-guest.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-guest.xml
982648
@@ -20,6 +20,7 @@
982648
   <feature policy='require' name='osxsave'/>
982648
   <feature policy='require' name='tsc_adjust'/>
982648
   <feature policy='require' name='cmt'/>
982648
+  <feature policy='require' name='stibp'/>
982648
   <feature policy='require' name='mbm_total'/>
982648
   <feature policy='require' name='mbm_local'/>
982648
   <feature policy='require' name='pdpe1gb'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-host.xml
982648
index 357cafd10a..60a7a9339d 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-host.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4-host.xml
982648
@@ -25,6 +25,7 @@
982648
   <feature name='arat'/>
982648
   <feature name='tsc_adjust'/>
982648
   <feature name='cmt'/>
982648
+  <feature name='stibp'/>
982648
   <feature name='xsaveopt'/>
982648
   <feature name='mbm_total'/>
982648
   <feature name='mbm_local'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-disabled.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-disabled.xml
982648
index b5c70a9dc4..a5b85a15c2 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-disabled.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-disabled.xml
982648
@@ -1,7 +1,7 @@
982648
 
982648
 <cpudata arch='x86'>
982648
   <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x0804c1fc' edx='0xb0600000'/>
982648
-  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000008' edx='0x00000000'/>
982648
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x00001000' ecx='0x00000008' edx='0x08000000'/>
982648
   <cpuid eax_in='0x0000000d' ecx_in='0x01' eax='0x00000008' ebx='0x00000000' ecx='0x00000000' edx='0x00000000'/>
982648
   <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
982648
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml
982648
index 5f51dea631..64b69dea56 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml
982648
@@ -22,6 +22,7 @@
982648
   <feature policy='require' name='cmt'/>
982648
   <feature policy='require' name='clflushopt'/>
982648
   <feature policy='require' name='pku'/>
982648
+  <feature policy='require' name='stibp'/>
982648
   <feature policy='require' name='xsaves'/>
982648
   <feature policy='require' name='mbm_total'/>
982648
   <feature policy='require' name='mbm_local'/>
982648
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml
982648
index a11b31369d..00e8da7512 100644
982648
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml
982648
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml
982648
@@ -23,6 +23,7 @@
982648
   <feature name='cmt'/>
982648
   <feature name='clflushopt'/>
982648
   <feature name='pku'/>
982648
+  <feature name='stibp'/>
982648
   <feature name='xsaves'/>
982648
   <feature name='mbm_total'/>
982648
   <feature name='mbm_local'/>
982648
-- 
982648
2.18.0
982648