Skip to content

Commit

Permalink
x86, microcode: Don't initialize microcode code on paravirt
Browse files Browse the repository at this point in the history
Paravirtual guests are not expected to load microcode into processors
and therefore it is not necessary to initialize microcode loading
logic.

In fact, under certain circumstances initializing this logic may cause
the guest to crash. Specifically, 32-bit kernels use __pa_nodebug()
macro which does not work in Xen (the code path that leads to this macro
happens during resume when we call mc_bp_resume()->load_ucode_ap()
->check_loader_disabled_ap())

Signed-off-by: Boris Ostrovsky <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
  • Loading branch information
Boris Ostrovsky authored and suryasaimadhu committed Dec 6, 2014
1 parent 4776862 commit a18a0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/microcode/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static int __init microcode_init(void)
struct cpuinfo_x86 *c = &cpu_data(0);
int error;

if (dis_ucode_ldr)
if (paravirt_enabled() || dis_ucode_ldr)
return 0;

if (c->x86_vendor == X86_VENDOR_INTEL)
Expand Down

0 comments on commit a18a0f6

Please sign in to comment.