On Wed, 9 Oct 2013 17:43:08 +0800 Chen Fan <chen.fan.f...@cn.fujitsu.com> wrote:
> Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot remove > one vCPU, it is able to send a signal to QEMU, then QEMU could notify > the assigned vCPU of exiting. meanwhile, and intruduce the QOM command > 'cpu-del' to remove > vCPU from QEMU itself. have you tried following sequence: cpu-add 1 cpu-add 2 cpu-del 1 and then do migration? > > this work is based on Andreas Färber's qom-cpu branch tree. > git://github.com/afaerber/qemu-cpu.git > > 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 (10): > x86: move apic_state field from CPUX86State to X86CPU > apic: remove redundant variable 'apic_no' from apic_init_common() > apic: remove local_apics array and using CPU_FOREACH instead > x86: add x86_cpu_unrealizefn() for cpu apic remove > qmp: add 'cpu-del' command support > qom cpu: rename variable 'cpu_added_notifier' to > 'cpu_hotplug_notifier' > qom cpu: add UNPLUG cpu notifier support > i386: implement pc interface pc_hot_del_cpu() > piix4: implement function cpu_status_write() for vcpu ejection > cpus: reclaim allocated vCPU objects > > cpu-exec.c | 2 +- > cpus.c | 51 +++++++++++++++++++++-- > hw/acpi/piix4.c | 66 ++++++++++++++++++++++++------ > hw/i386/kvm/apic.c | 18 +++++++- > hw/i386/kvmvapic.c | 8 ++-- > hw/i386/pc.c | 51 ++++++++++++++++++----- > hw/i386/pc_piix.c | 3 +- > hw/intc/apic.c | 91 > ++++++++++++++++++++++------------------- > hw/intc/apic_common.c | 17 ++------ > include/hw/boards.h | 2 + > include/hw/i386/apic_internal.h | 6 +-- > include/hw/i386/pc.h | 1 + > include/qom/cpu.h | 20 +++++++++ > include/sysemu/kvm.h | 1 + > include/sysemu/sysemu.h | 2 +- > kvm-all.c | 25 +++++++++++ > qapi-schema.json | 12 ++++++ > qmp-commands.hx | 23 +++++++++++ > qmp.c | 9 ++++ > qom/cpu.c | 26 +++++++++--- > target-i386/cpu-qom.h | 5 +++ > target-i386/cpu.c | 57 ++++++++++++++++++++------ > target-i386/cpu.h | 4 -- > target-i386/helper.c | 9 ++-- > target-i386/kvm.c | 23 +++++------ > target-i386/misc_helper.c | 8 ++-- > 26 files changed, 403 insertions(+), 137 deletions(-) >