x86/microcode: always collect_cpu_info() during boot
authorSergey Dyasli <sergey.dyasli@citrix.com>
Thu, 1 Aug 2019 10:22:37 +0000 (18:22 +0800)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 1 Aug 2019 17:45:32 +0000 (18:45 +0100)
commit2bb2c55cf870e78bc7f514784b2cd8c947d8729c
tree41fe1e729d07e439f923ec522cbc76d25cf306f4
parent05f13382aaf29411cf76432054ed2449d5773968
x86/microcode: always collect_cpu_info() during boot

Currently cpu_sig struct is not updated during boot if no microcode blob
is specified by "ucode=[<interger>| scan]".

It will result in cpu_sig.rev being 0 which affects APIC's
check_deadline_errata() and retpoline_safe() functions.

Fix this by getting ucode revision early during boot and SMP bring up.
While at it, protect early_microcode_update_cpu() for cases when
microcode_ops is NULL.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/microcode.c