Patch "x86/AMD: Apply erratum 665 on machines without a BIOS fix" has been added to the 4.7-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
x86/AMD: Apply erratum 665 on machines without a BIOS fix
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-amd-apply-erratum-665-on-machines-without-a-bios-fix.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
d1992996753132e2dafe955cccb2fb0714d3cfc4Mon Sep 17 00:00:00 2001
From: Emanuel Czirai <[email protected]>
Date: Fri, 2 Sep 2016 07:35:50 +0200
Subject: x86/AMD: Apply erratum 665 on machines without a BIOS fix
From: Emanuel Czirai <[email protected]>
commit d1992996753132e2dafe955cccb2fb0714d3cfc4 upstream.
AMD F12h machines have an erratum which can cause DIV/IDIV to behave unpredictably. The workaround is to set MSRC001_1029[31] but sometimes there is no BIOS update containing that workaround so let's do it ourselves unconditionally. It is simple enough.
[ Borislav: Wrote commit message. ]
--- arch/x86/kernel/cpu/amd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/x86/kernel/cpu/amd.c +12 -0
@@ -669,6 +669,17 @@ static void init_amd_gh(struct cpuinfo_xset_cpu_bug (c,X86_BUG_AMD_TLB_MMATCH ); } +#define MSR_AMD64_DE_CFG 0xC0011029 + +static void init_amd_ln (struct cpuinfo_x86 *c) +{ +/* +* Apply erratum 665 fix unconditionally so machines without a BIOS +* fix work. +*/ +msr_set_bit (MSR_AMD64_DE_CFG ,31 ); +} +static void init_amd_bd (struct cpuinfo_x86 *c) {u64 value;
@@ -726,6 +737,7 @@ static void init_amd(struct cpuinfo_x86case 6 :init_amd_k7 (c);break ;case 0xf :init_amd_k8 (c);break ;case 0x10 :init_amd_gh (c);break ; +case 0x12 :init_amd_ln (c);break ;case 0x15 :init_amd_bd (c);break ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/x86-amd-apply-erratum-665-on-machines-without-a-bios-fix.patch