On Wed, Aug 24, 2016 at 09:35:33AM -0400, Peter Krempa wrote:
Individual vCPU hotplug requires us to track the state of any vCPU. To allow this add the following XML: <domain> ... <vcpu current='2'>3</vcpu> <vcpus> <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/> <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/> <vcpu id='1' enabled='no' hotpluggable='yes'/> </vcpus> ... The 'enabled' attribute allows to control the state of the vcpu. 'hotpluggable' controls whether given vcpu can be hotplugged and 'order' allows to specify the order to add the vcpus. --- Notes: v3: - fixed extraction of the hotpluggable state v2: - added documentation - added tweak of hotplug state when reconnecting to a VM - discussed design requests in previous thread docs/formatdomain.html.in | 40 ++++++ docs/schemas/domaincommon.rng | 25 ++++ src/conf/domain_conf.c | 154 ++++++++++++++++++++- src/conf/domain_conf.h | 6 + src/qemu/qemu_domain.c | 11 +- .../generic-vcpus-individual.xml | 23 +++ tests/genericxml2xmltest.c | 2 + tests/testutils.c | 4 +- 8 files changed, 261 insertions(+), 4 deletions(-) create mode 100644 tests/genericxml2xmlindata/generic-vcpus-individual.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 052f28c..5b3d652 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -583,6 +583,31 @@ </optional> <optional> + <element name="vcpus"> + <zeroOrMore> + <element name="vcpu"> + <attribute name="id"> + <ref name="unsignedInt"/> + </attribute> + <attribute name="enabled"> + <ref name="virYesNo"/> + </attribute> + <optional> + <attribute name="hotpluggable"> + <ref name="virYesNo"/> + </attribute> + </optional> + <optional> + <attribute name="order"> + <ref name="unsignedInt"/> + </attribute>
The rest of the file uses two spaces for indentation. ACK with that fixed. Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list