x86/microcode/intel: Writeback and invalidate caches before updating microcode
authorAshok Raj <ashok.raj@intel.com>
Wed, 28 Feb 2018 10:28:42 +0000 (11:28 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Mar 2018 09:19:25 +0000 (10:19 +0100)
commit91df9fdf51492aec9fed6b4cbd33160886740f47
tree940c5fe62a3610aaa1c1b954c151b41fa02de41d
parentc182d2b7d0ca48e0d6ff16f7d883161238c447ed
x86/microcode/intel: Writeback and invalidate caches before updating microcode

Updating microcode is less error prone when caches have been flushed and
depending on what exactly the microcode is updating. For example, some
of the issues around certain Broadwell parts can be addressed by doing a
full cache flush.

[ Borislav: Massage it and use native_wbinvd() in both cases. ]

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Ashok Raj <ashok.raj@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Link: http://lkml.kernel.org/r/1519352533-15992-3-git-send-email-ashok.raj@intel.com
Link: https://lkml.kernel.org/r/20180228102846.13447-4-bp@alien8.de
arch/x86/kernel/cpu/microcode/intel.c