x86/microcode: unify ucode loading during system bootup and resuming
authorChao Gao <chao.gao@intel.com>
Fri, 27 Sep 2019 12:12:34 +0000 (14:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2019 12:12:34 +0000 (14:12 +0200)
commitc6f4df21580b6c65d63011c172b779d209ff7fa9
tree5d39038dc8e6f5ef2b38a6403ea6da5837b24e86
parent220f89505e77d716c412c8a7f8b20b3684b00160
x86/microcode: unify ucode loading during system bootup and resuming

During system bootup and resuming, CPUs just load the cached ucode.
So one unified function microcode_update_one() is introduced. It
takes a boolean to indicate whether ->start_update should be called.
Since early_microcode_update_cpu() is only called on BSP (APs call
the unified function), start_update is always true and so remove
this parameter.

There is a functional change: ->start_update is called on BSP and
->end_update_percpu is called during system resuming. They are not
invoked by previous microcode_resume_cpu().

Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/power.c
xen/arch/x86/microcode.c
xen/arch/x86/smpboot.c
xen/include/asm-x86/processor.h