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

Changelog:
  since v2:
    * use 0xFFFFFFFF for UNASSIGNED_APIC_ID instead of UINT32_MAX
    * add comment why 0xFFFFFFFF could be used for UNASSIGNED_APIC_ID
    * print topo ids is unsigned
    * print APIC ID as hex
    * print topo ids calculated from APIC ID beside it
    * add extra patch to fix migration failure due to APIC's instance_id mismatch
  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 replicate exact topology on taggert with -device CPUs
also opens poosibility to hot-remove CPUs, which this series does by
enabling to use 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

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

Tested with RHEL7.2 guest including ping/pong migration with adding/removing
CPUs in between.

Igor Mammedov (19):
  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
  apic: use apic_id as apic's migration instance_id
  target-i386: cpu: 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           |  33 ++++--
 include/hw/i386/apic_internal.h |   5 +-
 include/hw/i386/pc.h            |   5 +
 include/hw/i386/topology.h      |  15 +++
 qmp-commands.hx                 |  15 +++
 target-i386/cpu.c               |  88 ++++++---------
 target-i386/cpu.h               |  11 +-
 10 files changed, 320 insertions(+), 116 deletions(-)

-- 
2.7.0

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

end of thread, other threads:[~2016-07-20 15:12 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06  6:20 [Qemu-devel] [PATCH v3 00/19] pc: add CPU hot-add/hot-remove with device_add/device_del Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 01/19] target-i386: cpu: use uint32_t for X86CPU.apic_id Igor Mammedov
2016-07-12  2:14   ` Eduardo Habkost
2016-07-13 22:13   ` Bandan Das
2016-07-14  8:10     ` Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 02/19] pc: add x86_topo_ids_from_apicid() Igor Mammedov
2016-07-12  2:21   ` Eduardo Habkost
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 03/19] pc: extract CPU lookup into a separate function Igor Mammedov
2016-07-12  2:28   ` Eduardo Habkost
2016-07-12 11:38     ` Igor Mammedov
2016-07-12 12:26   ` Eduardo Habkost
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug() Igor Mammedov
2016-07-12  2:28   ` Eduardo Habkost
2016-07-12 12:01     ` Igor Mammedov
2016-07-12 12:25       ` Eduardo Habkost
2016-07-13 22:16   ` Bandan Das
2016-07-14  8:14     ` Igor Mammedov
2016-07-20 15:12   ` Eduardo Habkost
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 05/19] target-i386: cpu: replace custom apic-id setter/getter with static property Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 06/19] target-i386: add socket/core/thread properties to X86CPU Igor Mammedov
2016-07-12  2:33   ` Eduardo Habkost
2016-07-13 22:22   ` Bandan Das
2016-07-14  8:18     ` Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 07/19] pc: set APIC ID based on socket/core/thread ids if it's not been set yet Igor Mammedov
2016-07-12  2:48   ` Eduardo Habkost
2016-07-12 12:52     ` Igor Mammedov
2016-07-13 15:00     ` Igor Mammedov
2016-07-13 22:24   ` Bandan Das
2016-07-13 22:38     ` Eduardo Habkost
2016-07-13 22:55       ` Bandan Das
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 08/19] pc: implement query-hotpluggable-cpus callback Igor Mammedov
2016-07-12  2:54   ` Eduardo Habkost
2016-07-12 12:31     ` Igor Mammedov
2016-07-12 14:14   ` Eric Blake
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 09/19] pc: delay setting number of boot CPUs to machine_done time Igor Mammedov
2016-07-12  3:29   ` Eduardo Habkost
2016-07-12 12:48     ` Igor Mammedov
2016-07-12 13:42       ` Igor Mammedov
2016-07-12 17:19         ` Eduardo Habkost
2016-07-13  7:44           ` Igor Mammedov
2016-07-12 17:18       ` Eduardo Habkost
2016-07-13  7:56         ` Igor Mammedov
2016-07-13 13:56           ` Eduardo Habkost
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 10/19] pc: register created initial and hotpluged CPUs in one place pc_cpu_plug() Igor Mammedov
2016-07-13 22:32   ` Bandan Das
2016-07-13 22:44     ` Eduardo Habkost
2016-07-13 22:59       ` Bandan Das
2016-07-13 23:37         ` Eduardo Habkost
2016-07-14  0:35           ` Bandan Das
2016-07-14  9:18           ` Igor Mammedov
2016-07-14 15:03             ` Eduardo Habkost
2016-07-14 15:40               ` Igor Mammedov
2016-07-14 16:43                 ` Eduardo Habkost
2016-07-14 16:50                   ` Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 11/19] pc: cpu: allow device_add to be used with x86 cpu Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 12/19] apic: move MAX_APICS check to 'apic' class Igor Mammedov
2016-07-13 22:47   ` Bandan Das
2016-07-13 23:38     ` Eduardo Habkost
2016-07-14  0:10       ` Bandan Das
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 13/19] apic: drop APICCommonState.idx and use APIC ID as index in local_apics[] Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 14/19] (kvm)apic: add unrealize callbacks Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 15/19] apic: use apic_id as apic's migration instance_id Igor Mammedov
2016-07-11 17:21   ` Dr. David Alan Gilbert
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 16/19] target-i386: cpu: do not ignore error and fix apic parent Igor Mammedov
2016-07-13 14:29   ` Eduardo Habkost
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 17/19] target-i386: fix apic object leak when CPU is deleted Igor Mammedov
2016-07-13 15:04   ` Eduardo Habkost
2016-07-13 15:26     ` Igor Mammedov
2016-07-13 15:46       ` Igor Mammedov
2016-07-13 16:46         ` Eduardo Habkost
2016-07-13 22:54   ` Bandan Das
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 18/19] target-i386: add x86_cpu_unrealizefn() Igor Mammedov
2016-07-13 14:59   ` Eduardo Habkost
2016-07-13 15:52     ` Igor Mammedov
2016-07-06  6:20 ` [Qemu-devel] [PATCH v3 19/19] pc: make device_del CPU work for x86 CPUs Igor Mammedov
2016-07-13 14:27 ` [Qemu-devel] [PATCH v3 00/19] pc: add CPU hot-add/hot-remove with device_add/device_del Eduardo Habkost
2016-07-13 14:34   ` 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).