x86/microcode: microcode_write() should not reference boot_cpu_data
microcode_write() internally calls the AMD or Intel microcode
update logic, both of which update the cpu_data(cpu)->microcode
value. For probing speculation features however, we call
init_scattered_cpuid_features() with boot_cpu_data which is stale
and might have an old value of microcode version.
Fix this by using cpu_data() instead.
Orabug:
27878230
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: John Haxby <john.haxby@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry-picked from commit
ea35f733dca011782ef2a3647e7f3ac284dbed2e)
Conflict:
arch/x86/kernel/cpu/microcode/core.c
[Backport: modify arch/x86/kernel/microcode_core.c instead.]
Signed-off-by: Brian Maly <brian.maly@oracle.com>