libvirt/src/cpu
Daniel P. Berrangé 2625722cbc cpu: add 'amd-ssbd' and 'amd-no-ssb' CPU features (CVE-2018-3639)
AMD x86 CPUs have two separate ways to mitigate the Speculative Store
Bypass hardware flaw. In current processors only non-architectural MSRs
are available, and so hypervisors must expose a virtualized MSR and CPU
flag "virt-ssbd" (CPUID Function 8000_0008, EBX[25]=1).

In future processors AMD will provide an architectural MSR, indicated by
existance of the CPUID Function 8000_0008, EBX[24]=1, to which QEMU has
given the name "amd-ssbd".

The "amd-ssbd" flag should be used in preference to "virt-ssbd", if it
is available, since it provides improved performance. For virtual
machine configuration, both should be exposed when available, to allow
for maximal guest OS compatibility as not all guests yet support both.

If future processes are not vulnerable to the flaw, this will be
indicated by the existance of CPUID Function 8000_0008, EBX[26]=1,
to which QEMU has given the name "amd-no-ssb".

See also 124441_AMD64_SpeculativeStoreBypassDisable_Whitepaper_final.pdf
from:

  https://bugzilla.kernel.org/show_bug.cgi?id=199889

Note that neither amd-ssbd or amd-no-ssb will be reported by the kernel
in /proc/cpuinfo. It knows about these CPUID bits and does the right thing,
but doesn't report their existance as distinct flags in /proc/cpuinfo.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-03 17:31:46 +01:00
..
cpu_arm.c cpu: Add optional list of allowed features to virCPUBaseline 2018-05-28 15:59:11 +02:00
cpu_arm.h
cpu_map.c cpu: Rework CPU map loading 2016-05-20 09:18:56 +02:00
cpu_map.h cpu: Rework CPU map loading 2016-05-20 09:18:56 +02:00
cpu_map.xml cpu: add 'amd-ssbd' and 'amd-no-ssb' CPU features (CVE-2018-3639) 2018-07-03 17:31:46 +01:00
cpu_ppc64_data.h cpu_ppc64: Avoid unnecessary pointer to virCPUppc64Data 2016-06-09 09:47:56 +02:00
cpu_ppc64.c cpu: Add optional list of allowed features to virCPUBaseline 2018-05-28 15:59:11 +02:00
cpu_ppc64.h cpu: Rename {powerpc,ppc} => ppc64 (exported symbols) 2015-08-05 13:30:16 +02:00
cpu_s390.c cpu_s390: Implement virCPUValidateFeatures 2017-09-18 10:40:12 +02:00
cpu_s390.h
cpu_x86_data.h cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks 2017-02-09 13:52:16 +01:00
cpu_x86.c cpu: Add optional list of allowed features to virCPUBaseline 2018-05-28 15:59:11 +02:00
cpu_x86.h qemu: Parse CPU stepping from query-cpu-model-expansion 2017-10-17 22:37:04 +02:00
cpu.c cpu: Add optional list of allowed features to virCPUBaseline 2018-05-28 15:59:11 +02:00
cpu.h cpu: Add optional list of allowed features to virCPUBaseline 2018-05-28 15:59:11 +02:00
Makefile.inc.am make: split CPU build rules into cpu/Makefile.inc.am 2018-03-05 17:12:01 +00:00