Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 store buffer fixes from Thomas Gleixner:
"Two fixes for the SSBD mitigation code:

- expose SSBD properly to guests. This got broken when the CPU
feature flags got reshuffled.

- simplify the CPU detection logic to avoid duplicate entries in the
tables"

* 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/speculation: Simplify the CPU bug detection logic
KVM/VMX: Expose SSBD properly to guests

+9 -17
+7 -15
arch/x86/kernel/cpu/common.c
··· 942 942 {} 943 943 }; 944 944 945 + /* Only list CPUs which speculate but are non susceptible to SSB */ 945 946 static const __initconst struct x86_cpu_id cpu_no_spec_store_bypass[] = { 946 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_PINEVIEW }, 947 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_LINCROFT }, 948 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_PENWELL }, 949 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CLOVERVIEW }, 950 - { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CEDARVIEW }, 951 947 { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1 }, 952 948 { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_AIRMONT }, 953 949 { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT2 }, ··· 951 955 { X86_VENDOR_INTEL, 6, INTEL_FAM6_CORE_YONAH }, 952 956 { X86_VENDOR_INTEL, 6, INTEL_FAM6_XEON_PHI_KNL }, 953 957 { X86_VENDOR_INTEL, 6, INTEL_FAM6_XEON_PHI_KNM }, 954 - { X86_VENDOR_CENTAUR, 5, }, 955 - { X86_VENDOR_INTEL, 5, }, 956 - { X86_VENDOR_NSC, 5, }, 957 958 { X86_VENDOR_AMD, 0x12, }, 958 959 { X86_VENDOR_AMD, 0x11, }, 959 960 { X86_VENDOR_AMD, 0x10, }, 960 961 { X86_VENDOR_AMD, 0xf, }, 961 - { X86_VENDOR_ANY, 4, }, 962 962 {} 963 963 }; 964 964 ··· 962 970 { 963 971 u64 ia32_cap = 0; 964 972 973 + if (x86_match_cpu(cpu_no_speculation)) 974 + return; 975 + 976 + setup_force_cpu_bug(X86_BUG_SPECTRE_V1); 977 + setup_force_cpu_bug(X86_BUG_SPECTRE_V2); 978 + 965 979 if (cpu_has(c, X86_FEATURE_ARCH_CAPABILITIES)) 966 980 rdmsrl(MSR_IA32_ARCH_CAPABILITIES, ia32_cap); 967 981 968 982 if (!x86_match_cpu(cpu_no_spec_store_bypass) && 969 983 !(ia32_cap & ARCH_CAP_SSB_NO)) 970 984 setup_force_cpu_bug(X86_BUG_SPEC_STORE_BYPASS); 971 - 972 - if (x86_match_cpu(cpu_no_speculation)) 973 - return; 974 - 975 - setup_force_cpu_bug(X86_BUG_SPECTRE_V1); 976 - setup_force_cpu_bug(X86_BUG_SPECTRE_V2); 977 985 978 986 if (x86_match_cpu(cpu_no_meltdown)) 979 987 return;
+2 -2
arch/x86/kvm/cpuid.c
··· 407 407 408 408 /* cpuid 7.0.edx*/ 409 409 const u32 kvm_cpuid_7_0_edx_x86_features = 410 - F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | F(SSBD) | 411 - F(ARCH_CAPABILITIES); 410 + F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | 411 + F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES); 412 412 413 413 /* all calls to cpuid_count() should be made on the same cpu */ 414 414 get_cpu();