From: Konrad Rzeszutek Wilk Date: Mon, 21 May 2018 21:54:49 +0000 (-0400) Subject: KVM: VMX: Expose SSBD properly to guests. X-Git-Tag: archive/raspbian/4.16.12-1+rpi1^2~13 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=acde7d03495a0b5968a4efbf5e685654fdfb4014;p=linux.git KVM: VMX: Expose SSBD properly to guests. The X86_FEATURE_SSBD is an synthetic CPU feature - that is it bit location has no relevance to the real CPUID 0x7.EBX[31] bit position. For that we need the new CPU feature name. Fixes: 52817587e706 ("x86/cpufeatures: Disentangle SSBD enumeration") CC: Paolo Bonzini Cc: "Radim Krčmář" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk Gbp-Pq: Topic bugfix/x86 Gbp-Pq: Name kvm-vmx-expose-ssbd-properly-to-guests.patch --- diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 3f400004f60..72adc852d01 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -402,8 +402,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, /* cpuid 7.0.edx*/ const u32 kvm_cpuid_7_0_edx_x86_features = - F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | F(SSBD) | - F(ARCH_CAPABILITIES); + F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | + F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES); /* all calls to cpuid_count() should be made on the same cpu */ get_cpu();