]> xenbits.xensource.com Git - libvirt.git/commit
qemu: command: Add support for sparse vcpu topologies
authorPeter Krempa <pkrempa@redhat.com>
Thu, 4 Aug 2016 12:36:24 +0000 (14:36 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 24 Aug 2016 19:44:47 +0000 (15:44 -0400)
commit9eb9106ea51b43102ee51132f69780b2c86ccbca
tree2a3582805fd7866aaf43c7ea3249ea6512339198
parent20ef1232ec9b51dc498d270f7c279235b6842d25
qemu: command: Add support for sparse vcpu topologies

Add support for using the new approach to hotplug vcpus using device_add
during startup of qemu to allow sparse vcpu topologies.

There are a few limitations imposed by qemu on the supported
configuration:
- vcpu0 needs to be always present and not hotpluggable
- non-hotpluggable cpus need to be ordered at the beginning
- order of the vcpus needs to be unique for every single hotpluggable
  entity

Qemu also doesn't really allow to query the information necessary to
start a VM with the vcpus directly on the commandline. Fortunately they
can be hotplugged during startup.

The new hotplug code uses the following approach:
- non-hotpluggable vcpus are counted and put to the -smp option
- qemu is started
- qemu is queried for the necessary information
- the configuration is checked
- the hotpluggable vcpus are hotplugged
- vcpus are started

This patch adds a lot of checking code and enables the support to
specify the individual vcpu element with qemu.
docs/formatdomain.html.in
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_process.c
tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-cpu-hotplug-startup.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c