Blame SOURCES/libvirt-cpu-add-CPU-features-and-model-for-indirect-branch-prediction-protection.patch

c1c534
From 9df09ec5e1afef8659271c6cc4a5b741d5d06815 Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <9df09ec5e1afef8659271c6cc4a5b741d5d06815@dist-git>
c1c534
From: Paolo Bonzini <pbonzini@redhat.com>
c1c534
Date: Tue, 12 Dec 2017 16:23:42 +0100
c1c534
Subject: [PATCH] cpu: add CPU features and model for indirect branch
c1c534
 prediction protection
c1c534
c1c534
CVE-2017-5715
c1c534
c1c534
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
c1c534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c1c534
---
c1c534
 src/cpu/cpu_map.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++
c1c534
 1 file changed, 58 insertions(+)
c1c534
c1c534
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
c1c534
index 96f4ce60dd..a7888ec134 100644
c1c534
--- a/src/cpu/cpu_map.xml
c1c534
+++ b/src/cpu/cpu_map.xml
c1c534
@@ -292,6 +292,15 @@
c1c534
     <feature name='avx512-4fmaps'>
c1c534
       <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00000008'/>
c1c534
     </feature>
c1c534
+    <feature name='spec-ctrl'>
c1c534
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x04000000'/>
c1c534
+    </feature>
c1c534
+    <feature name='stibp'>
c1c534
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
c1c534
+    </feature>
c1c534
+    <feature name='arch-facilities'>
c1c534
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
c1c534
+    </feature>
c1c534
 
c1c534
     
c1c534
     <feature name='xsaveopt'>
c1c534
@@ -420,6 +429,11 @@
c1c534
       <cpuid eax_in='0x80000007' edx='0x00000100'/>
c1c534
     </feature>
c1c534
 
c1c534
+    
c1c534
+    <feature name='ibpb'>
c1c534
+      <cpuid eax_in='0x80000008' ebx='0x00001000'/>
c1c534
+    </feature>
c1c534
+
c1c534
     
c1c534
     <model name='486'>
c1c534
       <feature name='fpu'/>
c1c534
@@ -866,6 +880,10 @@
c1c534
       <feature name='syscall'/>
c1c534
       <feature name='tsc'/>
c1c534
     </model>
c1c534
+    <model name='Nehalem-IBRS'>
c1c534
+      <model name='Nehalem'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Westmere'>
c1c534
       <signature family='6' model='44'/>
c1c534
@@ -903,6 +921,10 @@
c1c534
       <feature name='syscall'/>
c1c534
       <feature name='tsc'/>
c1c534
     </model>
c1c534
+    <model name='Westmere-IBRS'>
c1c534
+      <model name='Westmere'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='SandyBridge'>
c1c534
       <signature family='6' model='42'/>
c1c534
@@ -946,6 +968,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='SandyBridge-IBRS'>
c1c534
+      <model name='SandyBridge'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='IvyBridge'>
c1c534
       <signature family='6' model='58'/>
c1c534
@@ -995,6 +1021,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='IvyBridge-IBRS'>
c1c534
+      <model name='IvyBridge'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Haswell-noTSX'>
c1c534
       <signature family='6' model='60'/>
c1c534
@@ -1048,6 +1078,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='Haswell-noTSX-IBRS'>
c1c534
+      <model name='Haswell-noTSX'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Haswell'>
c1c534
       <signature family='6' model='60'/>
c1c534
@@ -1103,6 +1137,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='Haswell-IBRS'>
c1c534
+      <model name='Haswell'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Broadwell-noTSX'>
c1c534
       <signature family='6' model='61'/>
c1c534
@@ -1160,6 +1198,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='Broadwell-noTSX-IBRS'>
c1c534
+      <model name='Broadwell-noTSX'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Broadwell'>
c1c534
       <signature family='6' model='61'/>
c1c534
@@ -1219,6 +1261,10 @@
c1c534
       <feature name='x2apic'/>
c1c534
       <feature name='xsave'/>
c1c534
     </model>
c1c534
+    <model name='Broadwell-IBRS'>
c1c534
+      <model name='Broadwell'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Skylake-Client'>
c1c534
       <signature family='6' model='94'/>
c1c534
@@ -1287,6 +1333,10 @@
c1c534
       <feature name='xsavec'/>
c1c534
       <feature name='xsaveopt'/>
c1c534
     </model>
c1c534
+    <model name='Skylake-Client-IBRS'>
c1c534
+      <model name='Skylake-Client'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     <model name='Skylake-Server'>
c1c534
       <signature family='6' model='85'/>
c1c534
@@ -1362,6 +1412,10 @@
c1c534
       <feature name='xsavec'/>
c1c534
       <feature name='xsaveopt'/>
c1c534
     </model>
c1c534
+    <model name='Skylake-Server-IBRS'>
c1c534
+      <model name='Skylake-Server'/>
c1c534
+      <feature name='spec-ctrl'/>
c1c534
+    </model>
c1c534
 
c1c534
     
c1c534
     <model name='athlon'>
c1c534
@@ -1700,6 +1754,10 @@
c1c534
       <feature name='xsavec'/>
c1c534
       <feature name='xsaveopt'/>
c1c534
     </model>
c1c534
+    <model name='EPYC-IBRS'>
c1c534
+      <model name='EPYC'/>
c1c534
+      <feature name='ibpb'/>
c1c534
+    </model>
c1c534
   </arch>
c1c534
 
c1c534
   <arch name='ppc64'>
c1c534
-- 
c1c534
2.15.1
c1c534