The changes for CPU
microcode loading that were done recently (change set 18475 in unstable
staging) seem to be causing a crash. I am using an Intel system and I get an
assertion in Xen during the DOM0 boot. This is what I believe is going on.
the routine do_microcode_update() is dispatching the update work to each CPU
with on_each_cpu() which in turn uses an IPI to dispatch the callback vector on
each CPU. The microcode update routine passed in is called in the IPI context
on the target CPU (including irq_enter() before calling the ucode function).
Within the ucode function the calls eventually get down to the Intel specific
calls in microcode_intel.c. Specifically:
Within the last
call, vmalloc() is called and eventually _xmalloc() asserts on ASSERT(!in_irq()).
I checked and the earlier code, though it dispatched work to different CPUs
with IPIs, did not try to dynamically allocate memory. I am not sure how to fix
this easily without redoing how the whole new microcode framework works. Also I
didn’t look closely at AMD but it may have the same issue. I can take a
crack at fixing it but maybe someone will see a simple solution.
Senior Software Engineer
Citrix Systems, Inc
14 Crosby Drive
Bedford, MA 01730