Skip to contentSkip to conversation

x86: consolidate microcode loading code

PATCH In review Jan Beulich 1 participant 1 message Nov 30, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86: consolidate microcode loading code

- memory was leaked on a CPU offline/online cycle (including S3)
- memory was leaked on AMD systems when microcode_update() ran a 2nd time with the same data that was used on the first run
- microcode never got restored on APs during S3 resume (or post-boot onlining of a CPU that was also online when microcode_update() first ran [in the event the prior microcode update got lost intermediately, which supposedly shouldn't happen]); this will still be the case when no other online CPU has an identical signature (which however is now consistent with bringing up such a CPU the very first time)
- resume was unimplemented in the AMD case
- there was a race between microcode_update_cpu() and microcode_resume_cpu()

This also moves vendor specific type declarations to the vendor source file and sets the stage for boot time microcode loading (i.e. without Dom0 involvement).

xen/arch/x86/Makefile +2 -1
@@ -30,9 +30,10 @@ obj-y += io_apic.o
 obj-y += msi.o
 obj-y += ioport_emulate.o
 obj-y += irq.o
-obj-y += microcode.o
 obj-y += microcode_amd.o
 obj-y += microcode_intel.o
+# This must come after the vendor specific files.
+obj-y += microcode.o
 obj-y += mm.o
 obj-y += mpparse.o
 obj-y += nmi.o
xen/arch/x86/microcode.c +62 -15

112 lines not on this page · raw message

xen/arch/x86/microcode_amd.c +97 -53

247 lines not on this page · raw message

xen/arch/x86/microcode_intel.c +43 -14

105 lines not on this page · raw message

xen/include/asm-x86/microcode.h +1 -63

75 lines not on this page · raw message

x86: consolidate microcode loading code

- memory was leaked on a CPU offline/online cycle (including S3)
- memory was leaked on AMD systems when microcode_update() ran a 2nd time with the same data that was used on the first run
- microcode never got restored on APs during S3 resume (or post-boot onlining of a CPU that was also online when microcode_update() first ran [in the event the prior microcode update got lost intermediately, which supposedly shouldn't happen]); this will still be the case when no other online CPU has an identical signature (which however is now consistent with bringing up such a CPU the very first time)
- resume was unimplemented in the AMD case
- there was a race between microcode_update_cpu() and microcode_resume_cpu()

This also moves vendor specific type declarations to the vendor source file and sets the stage for boot time microcode loading (i.e. without Dom0 involvement).

xen/arch/x86/Makefile +2 -1
@@ -30,9 +30,10 @@ obj-y += io_apic.o
 obj-y += msi.o
 obj-y += ioport_emulate.o
 obj-y += irq.o
-obj-y += microcode.o
 obj-y += microcode_amd.o
 obj-y += microcode_intel.o
+# This must come after the vendor specific files.
+obj-y += microcode.o
 obj-y += mm.o
 obj-y += mpparse.o
 obj-y += nmi.o
xen/arch/x86/microcode.c +62 -15

112 lines not on this page · raw message

xen/arch/x86/microcode_amd.c +97 -53

247 lines not on this page · raw message

xen/arch/x86/microcode_intel.c +43 -14

105 lines not on this page · raw message

xen/include/asm-x86/microcode.h +1 -63

75 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel