mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
docs, schema, conf: Add support for PMU feature
Just a new feature that can be turned on/off. https://bugzilla.redhat.com/show_bug.cgi?id=1178853 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
ec010a55e7
commit
199390117c
@ -1456,6 +1456,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
<dt><code>pmu</code></dt>
|
||||
<dd>Depending on the <code>state</code> attribute (values <code>on</code>,
|
||||
<code>off</code>, default <code>on</code>) enable or disable the
|
||||
performance monitoring unit for the guest.
|
||||
<span class="since">Since 1.2.12</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="elementsTime">Time keeping</a></h3>
|
||||
|
@ -4054,6 +4054,9 @@
|
||||
<optional>
|
||||
<ref name="capabilities"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<ref name="pmu"/>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
@ -4879,6 +4882,14 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="pmu">
|
||||
<element name="pmu">
|
||||
<optional>
|
||||
<ref name="featurestate"/>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="featurestate">
|
||||
<attribute name="state">
|
||||
<ref name="virOnOff"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* domain_conf.c: domain XML processing
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2015 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||
* Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
*
|
||||
@ -138,7 +138,8 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
|
||||
"hyperv",
|
||||
"kvm",
|
||||
"pvspinlock",
|
||||
"capabilities")
|
||||
"capabilities",
|
||||
"pmu")
|
||||
|
||||
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
|
||||
"default",
|
||||
@ -13242,6 +13243,8 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
}
|
||||
ctxt->node = node;
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
|
||||
node = ctxt->node;
|
||||
ctxt->node = nodes[i];
|
||||
@ -19689,6 +19692,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
|
||||
switch ((virTristateSwitch) def->features[i]) {
|
||||
case VIR_TRISTATE_SWITCH_LAST:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* domain_conf.h: domain XML processing
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2015 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||
* Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
*
|
||||
@ -1605,6 +1605,7 @@ typedef enum {
|
||||
VIR_DOMAIN_FEATURE_KVM,
|
||||
VIR_DOMAIN_FEATURE_PVSPINLOCK,
|
||||
VIR_DOMAIN_FEATURE_CAPABILITIES,
|
||||
VIR_DOMAIN_FEATURE_PMU,
|
||||
|
||||
VIR_DOMAIN_FEATURE_LAST
|
||||
} virDomainFeature;
|
||||
|
25
tests/qemuxml2argvdata/qemuxml2argv-pmu-feature-off.xml
Normal file
25
tests/qemuxml2argvdata/qemuxml2argv-pmu-feature-off.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>6</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<pmu state='off'/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<controller type='usb' index='0'/>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
25
tests/qemuxml2argvdata/qemuxml2argv-pmu-feature.xml
Normal file
25
tests/qemuxml2argvdata/qemuxml2argv-pmu-feature.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>6</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<pmu/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<controller type='usb' index='0'/>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
25
tests/qemuxml2xmloutdata/qemuxml2xmlout-pmu-feature.xml
Normal file
25
tests/qemuxml2xmloutdata/qemuxml2xmlout-pmu-feature.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>6</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='network'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<pmu state='on'/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<controller type='usb' index='0'/>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -205,6 +205,9 @@ mymain(void)
|
||||
DO_TEST("kvm-features");
|
||||
DO_TEST("kvm-features-off");
|
||||
|
||||
DO_TEST_DIFFERENT("pmu-feature");
|
||||
DO_TEST("pmu-feature-off");
|
||||
|
||||
DO_TEST("hugepages");
|
||||
DO_TEST("hugepages-pages");
|
||||
DO_TEST("hugepages-pages2");
|
||||
|
Loading…
x
Reference in New Issue
Block a user