From a74f4e44649906dcd82151f7ef837f66d7fa2ab1 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 27 Sep 2010 17:36:06 -0600 Subject: [PATCH 01/15] vcpu: add current attribute to element Syntax agreed on in https://www.redhat.com/archives/libvir-list/2010-September/msg00476.html y ... can now be used to specify 1 <= x <= y current vcpus, in relation to the boot-time max of y vcpus. If current is omitted, then current and max are assumed to be the same value. * docs/schemas/domain.rng: Add new attribute. * docs/formatdomain.html.in: Document it. * tests/qemuxml2argvdata/qemuxml2argv-smp.xml: Add to domainschematest. * tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml: Likewise. --- docs/formatdomain.html.in | 9 +++++-- docs/schemas/domain.rng | 5 ++++ tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 28 +++++++++++++++++++++++++++ tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml | 22 +++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-smp.xml create mode 100644 tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a8a1fac..96de121 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -200,7 +200,7 @@ <swap_hard_limit>2097152</swap_hard_limit> <min_guarantee>65536</min_guarantee> </memtune> - <vcpu cpuset="1-4,^3,6">2</vcpu> + <vcpu cpuset="1-4,^3,6" current="1">2</vcpu> ...
@@ -238,7 +238,7 @@ minimum memory allocation for the guest. The units for this value are kilobytes (i.e. blocks of 1024 bytes)
vcpu
-
The content of this element defines the number of virtual +
The content of this element defines the maximum number of virtual CPUs allocated for the guest OS, which must be between 1 and the maximum supported by the hypervisor. Since 0.4.4, this element can contain an optional @@ -246,7 +246,10 @@ list of physical CPU numbers that virtual CPUs can be pinned to. Each element in that list is either a single CPU number, a range of CPU numbers, or a caret followed by a CPU number to - be excluded from a previous range. + be excluded from a previous range. Since + 0.8.5, the optional attribute current can + be used to specify whether fewer than the maximum number of + virtual CPUs should be enabled.
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index f230263..a934a77 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -337,6 +337,11 @@ + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml new file mode 100644 index 0000000..975f873 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml @@ -0,0 +1,28 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219200 + 219200 + 2 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + + diff --git a/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml new file mode 100644 index 0000000..d061e11 --- /dev/null +++ b/tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml @@ -0,0 +1,22 @@ + + pvtest + 596a5d2171f48fb2e068e2386a5c413e + + linux + /var/lib/xen/vmlinuz.2Dn2YT + /var/lib/xen/initrd.img.0u-Vhq + method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os + + 430080 + 4 + destroy + destroy + destroy + + + + + + + + -- 1.7.2.3