]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/cpu/amd.c
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / arch / x86 / kernel / cpu / amd.c
index 525712c7ffa20e58358428e490085ccdee0d992e..d3153e281d7291e78bb57d647d388171f4d006b2 100644 (file)
@@ -507,6 +507,16 @@ static void early_init_amd(struct cpuinfo_x86 *c)
                        set_cpu_cap(c, X86_FEATURE_EXTD_APICID);
        }
 #endif
+
+       /* F16h erratum 793, CVE-2013-6885 */
+       if (c->x86 == 0x16 && c->x86_model <= 0xf) {
+               u64 val;
+
+               rdmsrl(MSR_AMD64_LS_CFG, val);
+               if (!(val & BIT(15)))
+                       wrmsrl(MSR_AMD64_LS_CFG, val | BIT(15));
+       }
+
 }
 
 static const int amd_erratum_383[];