qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC qom-next v5 0/8] i386: add cpu hot remove support
@ 2013-12-23  9:04 Chen Fan
  2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 1/8] x86: move apic_state field from CPUX86State to X86CPU Chen Fan
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Chen Fan @ 2013-12-23  9:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Mammedov, Andreas Färber

Via implementing ACPI standard methods _EJ0 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 command
'cpu-del' to remove vCPU from QEMU itself. currently, this patches only support
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' always add/delete
vcpu sequentially, so I think this patches will be OK.

this work is based on Andreas Färber'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_state field from CPUX86State to X86CPU
  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 cpu_common_unrealizefn() in qom/cpu.c
  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/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_piix.c                 |  3 +-
 hw/intc/apic.c                    | 10 ++++++
 hw/intc/apic_common.c             | 23 +++++++++++++-
 hw/xen/xen_apic.c                 |  8 +++++
 include/hw/boards.h               |  2 ++
 include/hw/cpu/icc_bus.h          |  1 +
 include/hw/i386/apic_internal.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_helper.c         |  8 ++---
 29 files changed, 380 insertions(+), 78 deletions(-)

-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-24  2:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23  9:04 [Qemu-devel] [RFC qom-next v5 0/8] i386: add cpu hot remove support Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 1/8] x86: move apic_state field from CPUX86State to X86CPU Chen Fan
2013-12-23 15:36   ` Andreas Färber
2013-12-24  2:08     ` Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 2/8] x86: add x86_cpu_unrealizefn() for cpu apic remove Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 3/8] qmp: add 'cpu-del' command support Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 4/8] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier' Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 5/8] qom cpu: add UNPLUG cpu notifier support Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 6/8] i386: implement pc interface cpu_common_unrealizefn() in qom/cpu.c Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 7/8] piix4: implement function cpu_status_write() for vcpu ejection Chen Fan
2013-12-23  9:04 ` [Qemu-devel] [RFC qom-next v5 8/8] cpus: reclaim allocated vCPU objects Chen Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).