[PATCH] Fix SSBD not being exposed to guests. (v1)

From: Konrad Rzeszutek Wilk
Date: Mon May 21 2018 - 17:05:18 EST


Hi,

Without this patch, when launching QEMU with -cpu +ssbd I ended up
with a warning seeing that the CPU does not support - which in fact it does.

The issue was the X86_FEATURE_ - the kvm_cpuid_7_0_edx_x86_features
had bit 17 set (X86_FEATURE_SSBD), while the right bit should have been
bit 31 ( X86_FEATURE_SPEC_CTRL_SSBD). That meant the masking:

entry->edx &= kvm_cpuid_7_0_edx_x86_features;

would nicely clear the SSBD bit.

This fixes:
Fixes: 52817587e706 ("x86/cpufeatures: Disentangle SSBD enumeration")

arch/x86/kvm/cpuid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Konrad Rzeszutek Wilk (1):
KVM: VMX: Expose SSBD properly to guests.