Commit 21e1e57b authored by Borislav Petkov's avatar Borislav Petkov Committed by Stefan Bader

x86/cpu/AMD: Fix erratum 1076 (CPB bit)

CPUID Fn8000_0007_EDX[CPB] is wrongly 0 on models up to B1. But they do
support CPB (AMD's Core Performance Boosting cpufreq CPU feature), so fix that.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170907170821.16021-1-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>

CVE-2018-3639 (x86)

(backported from commit f7f3dc00)
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
[smb: no zen specific init function]
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 712d7d4c
......@@ -805,6 +805,15 @@ static void init_amd(struct cpuinfo_x86 *c)
if (cpu_has_amd_erratum(c, amd_erratum_400))
set_cpu_bug(c, X86_BUG_AMD_APIC_C1E);
if (c->x86 == 0x17) {
/*
* Fix erratum 1076: CPB feature bit not being set in CPUID.
* It affects all up to and including B1.
*/
if (c->x86_model <= 1 && c->x86_mask <= 1)
set_cpu_cap(c, X86_FEATURE_CPB);
}
rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
/* 3DNow or LM implies PREFETCHW */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment