]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/x86/kernel/cpu/common.c
x86/speculation: Support Enhanced IBRS on future CPUs
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / kernel / cpu / common.c
index 8f1bf52d24a0f7c413bb6a8c919c14b7660d57bb..345935832d0f2371f8bcd79b0ca5ca917a94103a 100644 (file)
@@ -1003,6 +1003,9 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)
        setup_force_cpu_bug(X86_BUG_SPECTRE_V1);
        setup_force_cpu_bug(X86_BUG_SPECTRE_V2);
 
+       if (ia32_cap & ARCH_CAP_IBRS_ALL)
+               setup_force_cpu_cap(X86_FEATURE_IBRS_ENHANCED);
+
        if (x86_match_cpu(cpu_no_meltdown))
                return;