qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/18] pc: add CPU hot-add/hot-remove with device_add/device_del
@ 2016-06-24 16:05 Igor Mammedov
  2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 01/18] target-i386: cpu: use uint32_t for X86CPU.apic_id Igor Mammedov
                   ` (17 more replies)
  0 siblings, 18 replies; 36+ messages in thread
From: Igor Mammedov @ 2016-06-24 16:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: pbonzini, rth, ehabkost, mst, armbru, eduardo.otubo, eblake,
	pkrempa, marcel

Changelog:
  since v1:
    * s/pc_find_cpu/pc_find_cpu_slot/ + add comment to it
    * add more sanity checks for socket-id/core-id/thread-id and 'apic'
      properties
    * include device_del cpu patches and related fixes to x86 CPU/apic

Series enabling usage of -device/device_add for adding CPUs as devices
and device_del for removing them. Using -device/device_add in combination
with query-hotpluggable-cpus QMP command allows to hotplug CPUs at any
not used possition and then safely migrate QEMU instance by specifying
hotadded CPUs on target with help of -device CLI option like with any
other device.
Having been able to hotadd arbitrary CPUs and migrate also opens poosibility
to hot-remove arbitrary CPUs, which this series enables by permitting using
device_del with x86 CPUs.

Series depends on following not yet commited patchsets:
 1: [PATCH v2 0/6] cpus: make "-cpu cpux, features" global properties
      https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg02579.html
    2: [PATCH v2 00/10] globals: Clean up validation and error checking
         https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05662.html
 3: [PATCH v2 2/2] qapi: keep names in 'CpuInstanceProperties' in sync with struct CPUCore
     https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg06972.html


git tree for testing:
  https://github.com/imammedo/qemu.git dev_del_cpu_v2
for viewing:
  https://github.com/imammedo/qemu/commits/dev_del_cpu_v2

Tested with RHEL7.2 guest including ping/pong migration with adding/removing
CPUs in between.
CPU removal only slightly tested (~ for a week) so please give it more attention
when testing.
v1 for referrence:
  https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg06810.html

Igor Mammedov (18):
  target-i386: cpu: use uint32_t for X86CPU.apic_id
  pc: add x86_topo_ids_from_apicid()
  pc: extract CPU lookup into a separate function
  pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug()
  target-i386: cpu: replace custom apic-id setter/getter with static
    property
  target-i386: add socket/core/thread properties to X86CPU
  pc: set APIC ID based on socket/core/thread ids if it's not been set
    yet
  pc: implement query-hotpluggable-cpus callback
  pc: delay setting number of boot CPUs to machine_done time
  pc: register created initial and hotpluged CPUs in one place
    pc_cpu_plug()
  pc: cpu: allow device_add to be used with x86 cpu
  apic: move MAX_APICS check to 'apic' class
  apic: drop APICCommonState.idx and use APIC ID as index in
    local_apics[]
  (kvm)apic: add unrealize callbacks
  target-i386: do not ignore error and fix apic parent
  target-i386: fix apic object leak when CPU is deleted
  target-i386: add x86_cpu_unrealizefn()
  pc: make device_del CPU work for x86 CPUs

 hw/i386/kvm/apic.c              |   5 +
 hw/i386/pc.c                    | 233 ++++++++++++++++++++++++++++++++--------
 hw/intc/apic.c                  |  26 ++++-
 hw/intc/apic_common.c           |  21 ++--
 include/hw/i386/apic_internal.h |   4 +-
 include/hw/i386/topology.h      |  15 +++
 qmp-commands.hx                 |  15 +++
 target-i386/cpu.c               |  88 ++++++---------
 target-i386/cpu.h               |   8 +-
 9 files changed, 300 insertions(+), 115 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2016-07-05  7:30 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24 16:05 [Qemu-devel] [PATCH v2 00/18] pc: add CPU hot-add/hot-remove with device_add/device_del Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 01/18] target-i386: cpu: use uint32_t for X86CPU.apic_id Igor Mammedov
2016-07-04 14:09   ` Michael S. Tsirkin
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 02/18] pc: add x86_topo_ids_from_apicid() Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 03/18] pc: extract CPU lookup into a separate function Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 04/18] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug() Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 05/18] target-i386: cpu: replace custom apic-id setter/getter with static property Igor Mammedov
2016-06-24 16:33   ` Eric Blake
2016-06-28  7:45     ` Igor Mammedov
2016-07-04 14:10   ` Michael S. Tsirkin
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 06/18] target-i386: add socket/core/thread properties to X86CPU Igor Mammedov
2016-07-04 14:12   ` Michael S. Tsirkin
2016-07-04 16:40     ` Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 07/18] pc: set APIC ID based on socket/core/thread ids if it's not been set yet Igor Mammedov
2016-07-04 19:17   ` Eduardo Habkost
2016-07-05  5:31     ` Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 08/18] pc: implement query-hotpluggable-cpus callback Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 09/18] pc: delay setting number of boot CPUs to machine_done time Igor Mammedov
2016-07-04 14:17   ` Michael S. Tsirkin
2016-07-04 16:15     ` Igor Mammedov
2016-07-04 16:42       ` Michael S. Tsirkin
2016-07-05  5:29         ` Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 10/18] pc: register created initial and hotpluged CPUs in one place pc_cpu_plug() Igor Mammedov
2016-06-24 16:05 ` [Qemu-devel] [PATCH v2 11/18] pc: cpu: allow device_add to be used with x86 cpu Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 12/18] apic: move MAX_APICS check to 'apic' class Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 13/18] apic: drop APICCommonState.idx and use APIC ID as index in local_apics[] Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 14/18] (kvm)apic: add unrealize callbacks Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 15/18] target-i386: do not ignore error and fix apic parent Igor Mammedov
2016-07-04 14:20   ` Michael S. Tsirkin
2016-07-04 16:39     ` Igor Mammedov
2016-07-05  7:30       ` Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 16/18] target-i386: fix apic object leak when CPU is deleted Igor Mammedov
2016-07-04 14:19   ` Michael S. Tsirkin
2016-07-04 15:25     ` Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 17/18] target-i386: add x86_cpu_unrealizefn() Igor Mammedov
2016-06-24 16:06 ` [Qemu-devel] [PATCH v2 18/18] pc: make device_del CPU work for x86 CPUs Igor Mammedov

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).