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>