From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vv1Sn-0000O6-92 for qemu-devel@nongnu.org; Mon, 23 Dec 2013 04:06:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vv1Sh-0008DR-9z for qemu-devel@nongnu.org; Mon, 23 Dec 2013 04:06:13 -0500 Received: from [222.73.24.84] (port=17879 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vv1Sg-0008CZ-Tq for qemu-devel@nongnu.org; Mon, 23 Dec 2013 04:06:07 -0500 From: Chen Fan Date: Mon, 23 Dec 2013 17:04:01 +0800 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC qom-next v5 0/8] i386: add cpu hot remove support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Via implementing ACPI standard methods =5FEJ0 in ACPI table, after Guest OS= remove one vCPU online, the fireware will store removed bitmap to QEMU, then QEMU = could know to notify the assigned vCPU of exiting. meanwhile, intruduce the QOM c= ommand 'cpu-del' to remove vCPU from QEMU itself. currently, this patches only sup= port the cpu deleted sequentially from the last one, and command 'cpu-del' would= always delete the last cpu every time. in libvirt, command 'virsh set-vcpus' alway= s add/delete vcpu sequentially, so I think this patches will be OK. this work is based on Andreas F=C3=A4rber's qom-next branch tree. git://github.com/afaerber/qemu-next.git this series patches must be used with KVM patch together. for KVM patches: http://comments.gmane.org/gmane.comp.emulators.kvm.devel/114347 v4-v5: delete command 'cpu-del' argument to remove cpu from the last one rather than specify vcpuid and fix migration bug. Chen Fan (8): x86: move apic=5Fstate field from CPUX86State to X86CPU x86: add x86=5Fcpu=5Funrealizefn() for cpu apic remove qmp: add 'cpu-del' command support qom cpu: rename variable 'cpu=5Fadded=5Fnotifier' to 'cpu=5Fhotplug=5Fnotifier' qom cpu: add UNPLUG cpu notifier support i386: implement pc interface cpu=5Fcommon=5Funrealizefn() in qom/cpu.c piix4: implement function cpu=5Fstatus=5Fwrite() for vcpu ejection cpus: reclaim allocated vCPU objects cpu-exec.c | 2 +- cpus.c | 51 ++++++++++++++++++++++++++++-- hw/acpi/piix4.c | 66 ++++++++++++++++++++++++++++++++---= ---- hw/i386/acpi-dsdt-cpu-hotplug.dsl | 6 +++- hw/i386/kvm/apic.c | 8 +++++ hw/i386/kvmvapic.c | 8 ++--- hw/i386/pc.c | 38 ++++++++++++++++------ hw/i386/pc=5Fpiix.c | 3 +- hw/intc/apic.c | 10 ++++++ hw/intc/apic=5Fcommon.c | 23 +++++++++++++- hw/xen/xen=5Fapic.c | 8 +++++ include/hw/boards.h | 2 ++ include/hw/cpu/icc=5Fbus.h | 1 + include/hw/i386/apic=5Finternal.h | 1 + include/hw/i386/pc.h | 1 + include/qom/cpu.h | 21 +++++++++++++ include/sysemu/kvm.h | 1 + include/sysemu/sysemu.h | 2 +- kvm-all.c | 25 +++++++++++++++ qapi-schema.json | 10 ++++++ qmp-commands.hx | 21 +++++++++++++ qmp.c | 9 ++++++ qom/cpu.c | 26 ++++++++++++--- target-i386/cpu-qom.h | 5 +++ target-i386/cpu.c | 66 ++++++++++++++++++++++++++++++++---= ---- target-i386/cpu.h | 4 --- target-i386/helper.c | 9 +++--- target-i386/kvm.c | 23 ++++++-------- target-i386/misc=5Fhelper.c | 8 ++--- 29 files changed, 380 insertions(+), 78 deletions(-) --=20 1.8.1.4 =