This adds support for vcpu hotplug and unplug using device_add and device_del.
Patches 1 and 2 are already mostly acked.
Peter Krempa (27):
qemu: monitor: Return structures from qemuMonitorGetCPUInfo
qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs
qemu: caps: Add capability for query-hotpluggable-cpus command
qemu: Forbid config when topology based cpu count doesn't match the
config
qemu: capabilities: Extract availability of new cpu hotplug for
machine types
qemu: monitor: Extract QOM path from query-cpus reply
qemu: monitor: Add support for calling query-hotpluggable-cpus
qemu: monitor: Add algorithm for combining query-(hotpluggable-)-cpus
data
tests: Add test infrastructure for qemuMonitorGetCPUInfo
tests: cpu-hotplug: Add data for ppc64 platform including hotplug
tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug
tests: cpu-hotplug: Add data for ppc64 without threads enabled
qemu: domain: Extract cpu-hotplug related data
qemu: domain: Prepare for VCPUs vanishing while libvirt is not running
qemu: setcpus: Report better errors
qemu: setcpus: Move NUMA setup code into the block checking live def
qemu: setvcpus: Extract setting of maximum vcpu count
util: Extract and rename qemuDomainDelCgroupForThread to
virCgroupDelThread
conf: Add XML for individual vCPU hotplug
qemu: migration: Prepare for non-contiguous vcpu configurations
qemu: command: Add helper to convert vcpu definition to JSON props
qemu: process: Copy final vcpu order information into the vcpu
definition
qemu: command: Add support for sparse vcpu topologies
qemu: Use mondern vcpu hotplug approach if possible
qemu: hotplug: Allow marking unplugged devices by alias
qemu: hotplug: Add support for VCPU unplug
RFC: qemu: hotplug: Add DEVICE_(ADDED|DELETED) events for vcpus
docs/formatdomain.html.in | 18 ++
docs/schemas/domaincommon.rng | 25 ++
src/conf/domain_conf.c | 151 ++++++++-
src/conf/domain_conf.h | 6 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 31 +-
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 50 ++-
src/qemu/qemu_command.h | 3 +
src/qemu/qemu_domain.c | 303 ++++++++++++++----
src/qemu/qemu_domain.h | 19 +-
src/qemu/qemu_driver.c | 354 +++++++++++++--------
src/qemu/qemu_hotplug.c | 134 +++++++-
src/qemu/qemu_hotplug.h | 7 +
src/qemu/qemu_migration.c | 16 +-
src/qemu/qemu_monitor.c | 260 ++++++++++++++-
src/qemu/qemu_monitor.h | 58 +++-
src/qemu/qemu_monitor_json.c | 266 +++++++++++++---
src/qemu/qemu_monitor_json.h | 8 +-
src/qemu/qemu_monitor_text.c | 39 ++-
src/qemu/qemu_monitor_text.h | 3 +-
src/qemu/qemu_process.c | 182 ++++++++++-
src/util/vircgroup.c | 20 ++
src/util/vircgroup.h | 4 +
.../generic-vcpus-individual.xml | 23 ++
tests/genericxml2xmltest.c | 2 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 55 ++--
.../qemumonitorjson-cpuinfo-ppc64-basic-cpus.json | 77 +++++
...emumonitorjson-cpuinfo-ppc64-basic-hotplug.json | 27 ++
.../qemumonitorjson-cpuinfo-ppc64-basic.data | 40 +++
...mumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 149 +++++++++
...onitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json | 28 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-1.data | 51 +++
...mumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 221 +++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json | 29 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-2.data | 62 ++++
...mumonitorjson-cpuinfo-ppc64-hotplug-3-cpus.json | 149 +++++++++
...onitorjson-cpuinfo-ppc64-hotplug-3-hotplug.json | 28 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-3.data | 51 +++
...mumonitorjson-cpuinfo-ppc64-hotplug-4-cpus.json | 221 +++++++++++++
...onitorjson-cpuinfo-ppc64-hotplug-4-hotplug.json | 29 ++
.../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data | 62 ++++
...umonitorjson-cpuinfo-ppc64-no-threads-cpus.json | 77 +++++
...nitorjson-cpuinfo-ppc64-no-threads-hotplug.json | 125 ++++++++
.../qemumonitorjson-cpuinfo-ppc64-no-threads.data | 72 +++++
...nitorjson-cpuinfo-x86-basic-pluggable-cpus.json | 50 +++
...orjson-cpuinfo-x86-basic-pluggable-hotplug.json | 82 +++++
...emumonitorjson-cpuinfo-x86-basic-pluggable.data | 39 +++
tests/qemumonitorjsontest.c | 183 ++++++++++-
.../qemuxml2argv-cpu-hotplug-startup.args | 20 ++
.../qemuxml2argv-cpu-hotplug-startup.xml | 29 ++
tests/qemuxml2argvtest.c | 2 +
tests/testutils.c | 4 +-
53 files changed, 3638 insertions(+), 310 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-vcpus-individual.xml
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-basic.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-1.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-2.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-3.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-hotplug-4.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-ppc64-no-threads.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable-hotplug.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-basic-pluggable.data
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.xml
--
2.9.2