From: Liu Ping Fan <pingf...@linux.vnet.ibm.com> A bunch of patches, which are applied separately for kernel and qemu-kvm, and make x86 based linux guest with cpu hotplug feature.
For kernel: 0001-ACPI-Call-ACPI-remove-handler-when-handling-ACPI-eje.patch --call acpi eject event handler in acpi_bus_notify() For qemu-kvm: 0001-ACPI-Update-cpu-hotplug-event-for-guest.patch --trigger acpi cpu hotplug event for guest, so qemu-kvm can bring present cpu to online state 0002-LAPIC-make-lapic-support-cpu-hotplug.patch --make qemu-kvm support to bring possible cpu to present state. After applying these patches, we can bring possible cpu online by the following step. 1.Boot up qemu-kvm with the param "-smp 1,maxcpu=4", 2.Use "cpu_set 2 online" cmd in qemu monitor to bring possible cpu to present state. 3.In guest,echo 1 > cpu2/online to bring the present cpu to online state.