render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c11cae
From 6fff75c304d9403ac7c36c436ddf53497f6417ef Mon Sep 17 00:00:00 2001
c11cae
Message-Id: <6fff75c304d9403ac7c36c436ddf53497f6417ef@dist-git>
c11cae
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
c11cae
Date: Mon, 21 May 2018 23:05:08 +0100
c11cae
Subject: [PATCH] cpu: define the 'virt-ssbd' CPUID feature bit (CVE-2018-3639)
c11cae
MIME-Version: 1.0
c11cae
Content-Type: text/plain; charset=UTF-8
c11cae
Content-Transfer-Encoding: 8bit
c11cae
c11cae
Some AMD processors only support a non-architectural means of
c11cae
enabling Speculative Store Bypass Disable. To allow simplified
c11cae
handling in virtual environments, hypervisors will expose an
c11cae
architectural definition through CPUID bit 0x80000008_EBX[25].
c11cae
This needs to be exposed to guest OS running on AMD x86 hosts to
c11cae
allow them to protect against CVE-2018-3639.
c11cae
c11cae
Note that since this CPUID bit won't be present in the host CPUID
c11cae
results on physical hosts, it will not be enabled automatically
c11cae
in guests configured with "host-model" CPU unless using QEMU
c11cae
version >= 2.9.0. Thus for older versions of QEMU, this feature
c11cae
must be manually enabled using policy=force. Guests using the
c11cae
"host-passthrough" CPU mode do not need special handling.
c11cae
c11cae
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
c11cae
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
c11cae
(cherry picked from commit 9267342206ce17f6933d57a3128cdc504d5945c9)
c11cae
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c11cae
Reviewed-by: Erik Skultety <eskultet@redhat.com>
c11cae
---
c11cae
 src/cpu/cpu_map.xml | 3 +++
c11cae
 1 file changed, 3 insertions(+)
c11cae
c11cae
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
c11cae
index cee3541d24..e0c39bb690 100644
c11cae
--- a/src/cpu/cpu_map.xml
c11cae
+++ b/src/cpu/cpu_map.xml
c11cae
@@ -436,6 +436,9 @@
c11cae
     <feature name='ibpb'>
c11cae
       <cpuid eax_in='0x80000008' ebx='0x00001000'/>
c11cae
     </feature>
c11cae
+    <feature name='virt-ssbd'>
c11cae
+      <cpuid eax_in='0x80000008' ebx='0x02000000'/>
c11cae
+    </feature>
c11cae
 
c11cae
     
c11cae
     <model name='486'>
c11cae
-- 
c11cae
2.17.1
c11cae