via implementing ACPI standard methods _EJ0, after Guest OS hot remove one vcpu, it is able to send a signal to QEMU, then QEMU could notify the assigned vcpu to exit.
this series patches must be used with seabios patch and KVM patch together. for KVM patches: http://comments.gmane.org/gmane.comp.emulators.kvm.devel/114347 for seabios patches: http://comments.gmane.org/gmane.comp.emulators.qemu/230460 Chen Fan (6): piix4: implement function 'cpu_status_write' for vcpu ejection cpus: release allocated vcpu objects and exit vcpu thread qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier' qmp: add 'cpu-del' command support qom cpu: add struct CPUNotifier for supporting PLUG and UNPLUG cpu notifier i386: implement cpu interface 'cpu_common_unrealizefn' cpus.c | 36 +++++++++++++++++++++++++++++ hw/acpi/piix4.c | 61 +++++++++++++++++++++++++++++++++++++++---------- hw/i386/pc.c | 24 ++++++++++++++++++- hw/i386/pc_piix.c | 1 + include/hw/boards.h | 2 ++ include/hw/i386/pc.h | 1 + include/qom/cpu.h | 19 +++++++++++++++ include/sysemu/kvm.h | 1 + include/sysemu/sysemu.h | 2 +- kvm-all.c | 26 +++++++++++++++++++++ qapi-schema.json | 12 ++++++++++ qmp-commands.hx | 23 +++++++++++++++++++ qmp.c | 9 ++++++++ qom/cpu.c | 27 ++++++++++++++++++---- 14 files changed, 225 insertions(+), 19 deletions(-) -- 1.8.1.4