]> www.infradead.org Git - users/jedix/linux-maple.git/commit
retpoline: microcode incorrectly reported as broken during early boot
authorChuck Anderson <chuck.anderson@oracle.com>
Thu, 22 Feb 2018 22:01:24 +0000 (14:01 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 3 Mar 2018 01:58:03 +0000 (17:58 -0800)
commit7f500a3ceedcd8e86a68d4eb8019c050d5435168
treee76b12a6c25a87614eb0701b6a01f3198f5b823c
parent9d7c6d542641c59fbe2cb485468cfd488ee10dcc
retpoline: microcode incorrectly reported as broken during early boot

init_scattered_cpuid_features() is called on each CPU to set its
capabilities based on features enumerated by the cpuid instruction.
If the CPU supports IBRS or STIBP, a call is made through
bad_spectre_microcode() to detect a microcode level that makes it
unsafe to use IBRS as a mitigation for Spectre.  A warning is issued
if the microcode is unsafe:

    Intel Spectre v2 broken microcode detected; disabling SPEC_CTRL/IBR

init_scattered_cpuid_features() may be called early during boot on the
boot CPU.  The microcode level from BIOS may be broken, triggering the
message above.  A subsequent microcode update made during early boot
could install a level that is IBRS/STIBP/IPBP safe making the warning
message misleading.  This patch skips the microcode check during early
boot.  The check is made during a subsequent call to
init_scattered_cpuid_features() after a potential microcode update.

Orabug: 27625404
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/cpu.h
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/scattered.c