2013-01-23 23:03:17 +08:00
<?xml version="1.0"?>
2009-08-05 11:56:56 +02:00
<!-- A Relax NG schema for the libvirt capabilities XML format -->
2009-01-27 15:29:53 +00:00
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2012-03-06 15:08:02 +01:00
<include href='basictypes.rng'/>
2009-01-27 15:29:53 +00:00
<start>
<ref name='capabilities'/>
</start>
<define name='capabilities'>
<element name='capabilities'>
<ref name='hostcaps'/>
<zeroOrMore>
2010-03-01 20:09:26 +01:00
<ref name='guestcaps'/>
2009-01-27 15:29:53 +00:00
</zeroOrMore>
</element>
</define>
<define name='hostcaps'>
<element name='host'>
2010-05-25 15:33:51 +01:00
<optional>
<element name='uuid'>
<ref name='UUID'/>
</element>
</optional>
2009-01-27 15:29:53 +00:00
<element name='cpu'>
2010-03-01 20:09:26 +01:00
<element name='arch'>
<ref name='archnames'/>
</element>
<optional>
<ref name='cpufeatures'/>
</optional>
<optional>
<ref name='cpuspec'/>
</optional>
2009-01-27 15:29:53 +00:00
</element>
2011-11-22 11:31:22 +08:00
<optional>
<ref name='power_management'/>
</optional>
2009-01-27 15:29:53 +00:00
<optional>
2010-03-01 20:09:26 +01:00
<ref name='migration'/>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<ref name='topology'/>
2009-01-27 15:29:53 +00:00
</optional>
2017-03-30 15:01:27 +02:00
<optional>
<ref name='cache'/>
</optional>
2012-08-15 19:10:36 -03:00
<zeroOrMore>
2010-03-01 20:09:26 +01:00
<ref name='secmodel'/>
2012-08-15 19:10:36 -03:00
</zeroOrMore>
2009-03-03 09:44:41 +00:00
</element>
</define>
<define name='secmodel'>
<element name='secmodel'>
2012-08-15 19:10:36 -03:00
<interleave>
<element name='model'>
<text/>
</element>
<element name='doi'>
<text/>
</element>
2013-10-18 14:13:21 +02:00
<zeroOrMore>
<element name='baselabel'>
<attribute name='type'>
<text/>
</attribute>
<text/>
</element>
</zeroOrMore>
2012-08-15 19:10:36 -03:00
</interleave>
2009-01-27 15:29:53 +00:00
</element>
</define>
2009-03-03 09:44:41 +00:00
2009-01-27 15:29:53 +00:00
<define name='cpufeatures'>
<element name='features'>
<optional>
2010-03-01 20:09:26 +01:00
<element name='pae'><empty/></element>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<element name='nonpae'><empty/></element>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<element name='vmx'><empty/></element>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<element name='svm'><empty/></element>
2009-01-27 15:29:53 +00:00
</optional>
</element>
</define>
2009-12-18 14:37:09 +01:00
<define name='cpuspec'>
<element name='model'>
<text/>
</element>
2010-07-02 17:51:59 +02:00
<optional>
<element name='vendor'>
<text/>
</element>
</optional>
2009-12-18 14:37:09 +01:00
<element name='topology'>
<attribute name='sockets'>
<ref name='positiveInteger'/>
</attribute>
<attribute name='cores'>
<ref name='positiveInteger'/>
</attribute>
<attribute name='threads'>
<ref name='positiveInteger'/>
</attribute>
</element>
<zeroOrMore>
<element name='feature'>
<attribute name='name'>
<ref name='featureName'/>
</attribute>
<empty/>
</element>
</zeroOrMore>
2014-06-06 18:12:51 +02:00
<zeroOrMore>
<ref name='pagesElem'/>
</zeroOrMore>
2009-12-18 14:37:09 +01:00
</define>
2011-11-22 11:31:22 +08:00
<define name='power_management'>
<element name='power_management'>
<interleave>
<optional>
2011-11-29 14:14:03 +00:00
<element name='suspend_mem'>
2011-11-22 11:31:22 +08:00
<empty/>
</element>
</optional>
<optional>
2011-11-29 14:14:03 +00:00
<element name='suspend_disk'>
2011-11-22 11:31:22 +08:00
<empty/>
</element>
</optional>
2011-11-29 14:56:10 +08:00
<optional>
2011-11-29 14:14:03 +00:00
<element name='suspend_hybrid'>
2011-11-29 14:56:10 +08:00
<empty/>
</element>
</optional>
2011-11-22 11:31:22 +08:00
</interleave>
</element>
</define>
2009-01-27 15:29:53 +00:00
<define name='migration'>
<element name='migration_features'>
<optional>
2010-03-01 20:09:26 +01:00
<element name='live'>
<empty/>
</element>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<element name='uri_transports'>
<oneOrMore>
<element name='uri_transport'>
<choice>
<value>esx</value>
<value>tcp</value>
<value>xenmigr</value>
</choice>
</element>
</oneOrMore>
</element>
2009-01-27 15:29:53 +00:00
</optional>
</element>
</define>
<define name='topology'>
<element name='topology'>
<element name='cells'>
2010-03-01 20:09:26 +01:00
<attribute name='num'>
2012-03-06 15:08:02 +01:00
<ref name='unsignedInt'/>
2010-03-01 20:09:26 +01:00
</attribute>
<oneOrMore>
<ref name='cell'/>
</oneOrMore>
2009-01-27 15:29:53 +00:00
</element>
</element>
</define>
<define name='cell'>
<element name='cell'>
<attribute name='id'>
2012-03-06 15:08:02 +01:00
<ref name='unsignedInt'/>
2009-01-27 15:29:53 +00:00
</attribute>
2013-03-07 11:03:36 -05:00
<optional>
<ref name='memory'/>
</optional>
2014-06-06 18:12:51 +02:00
<zeroOrMore>
<ref name='pagesElem'/>
</zeroOrMore>
2014-06-03 15:18:27 +02:00
<optional>
<element name='distances'>
<zeroOrMore>
<element name='sibling'>
<attribute name='id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='value'>
<ref name='unsignedInt'/>
</attribute>
</element>
</zeroOrMore>
</element>
</optional>
2009-01-27 15:29:53 +00:00
<optional>
2010-03-01 20:09:26 +01:00
<element name='cpus'>
<attribute name='num'>
2012-03-06 15:08:02 +01:00
<ref name='unsignedInt'/>
2010-03-01 20:09:26 +01:00
</attribute>
<oneOrMore>
<ref name='cpu'/>
</oneOrMore>
</element>
2009-01-27 15:29:53 +00:00
</optional>
</element>
</define>
2013-03-07 11:03:36 -05:00
<define name='memory'>
<element name='memory'>
<ref name='scaledInteger'/>
</element>
</define>
2009-01-27 15:29:53 +00:00
<define name='cpu'>
<element name='cpu'>
<attribute name='id'>
2012-03-06 15:08:02 +01:00
<ref name='unsignedInt'/>
2009-01-27 15:29:53 +00:00
</attribute>
2013-01-18 19:30:00 +01:00
<optional>
<attribute name='socket_id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='core_id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='siblings'>
<ref name='cpuset'/>
</attribute>
</optional>
2009-01-27 15:29:53 +00:00
</element>
</define>
2017-03-30 15:01:27 +02:00
<define name='cache'>
<element name='cache'>
<oneOrMore>
<element name='bank'>
<attribute name='id'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='level'>
<ref name='unsignedInt'/>
</attribute>
2017-05-17 17:08:33 +08:00
<ref name='cacheType'/>
2017-03-30 15:01:27 +02:00
<attribute name='size'>
<ref name='unsignedInt'/>
</attribute>
<attribute name='unit'>
<ref name='unit'/>
</attribute>
<attribute name='cpus'>
<ref name='cpuset'/>
</attribute>
2017-05-17 17:08:33 +08:00
<zeroOrMore>
<element name='control'>
2017-06-05 14:00:45 +02:00
<attribute name='granularity'>
2017-05-17 17:08:33 +08:00
<ref name='unsignedInt'/>
</attribute>
2017-06-05 14:00:45 +02:00
<optional>
<attribute name='min'>
<ref name='unsignedInt'/>
</attribute>
</optional>
2017-05-17 17:08:33 +08:00
<attribute name='unit'>
<ref name='unit'/>
</attribute>
<ref name='cacheType'/>
<attribute name='maxAllocs'>
<ref name='unsignedInt'/>
</attribute>
</element>
</zeroOrMore>
2017-03-30 15:01:27 +02:00
</element>
</oneOrMore>
</element>
</define>
2017-05-17 17:08:33 +08:00
<define name='cacheType'>
<attribute name='type'>
<choice>
<value>both</value>
<value>code</value>
<value>data</value>
</choice>
</attribute>
</define>
2009-01-27 15:29:53 +00:00
<define name='guestcaps'>
<element name='guest'>
<ref name='ostype'/>
<ref name='arch'/>
<optional>
2010-03-01 20:09:26 +01:00
<ref name='features'/>
2009-01-27 15:29:53 +00:00
</optional>
</element>
</define>
<define name='ostype'>
<element name='os_type'>
<choice>
2010-03-01 20:09:26 +01:00
<value>xen</value> <!-- Xen 3.0 pv -->
2015-04-22 10:34:38 -04:00
<value>linux</value> <!-- same as 'xen' - meant to be legacy,
but is also used by phyp driver -->
2010-03-01 20:09:26 +01:00
<value>hvm</value> <!-- unmodified OS -->
<value>exe</value> <!-- For container based virt -->
<value>uml</value> <!-- user mode linux -->
2009-01-27 15:29:53 +00:00
</choice>
</element>
</define>
<define name='arch'>
<element name='arch'>
<attribute name='name'>
2010-03-01 20:09:26 +01:00
<ref name='archnames'/>
2009-01-27 15:29:53 +00:00
</attribute>
<ref name='wordsize'/>
<optional>
2010-03-01 20:09:26 +01:00
<ref name='emulator'/>
2009-01-27 15:29:53 +00:00
</optional>
<optional>
2010-03-01 20:09:26 +01:00
<ref name='loader'/>
2009-01-27 15:29:53 +00:00
</optional>
<zeroOrMore>
2010-03-01 20:09:26 +01:00
<ref name='machine'/>
2009-01-27 15:29:53 +00:00
</zeroOrMore>
<oneOrMore>
2010-03-01 20:09:26 +01:00
<ref name='domain'/>
2009-01-27 15:29:53 +00:00
</oneOrMore>
</element>
</define>
<define name='emulator'>
<element name='emulator'>
2012-03-06 15:08:02 +01:00
<ref name='absFilePath'/>
2009-01-27 15:29:53 +00:00
</element>
</define>
<define name='loader'>
<element name='loader'>
2012-03-06 15:08:02 +01:00
<ref name='absFilePath'/>
2009-01-27 15:29:53 +00:00
</element>
</define>
<define name='wordsize'>
<element name='wordsize'>
<choice>
2010-03-01 20:09:26 +01:00
<value>31</value>
<value>32</value>
<value>64</value>
2009-01-27 15:29:53 +00:00
</choice>
</element>
</define>
<define name='machine'>
<element name='machine'>
2009-07-23 18:31:35 +01:00
<optional>
<attribute name='canonical'>
<text/>
</attribute>
</optional>
2013-06-26 17:46:35 +02:00
<optional>
<attribute name='maxCpus'>
<ref name='unsignedInt'/>
</attribute>
</optional>
2009-01-27 15:29:53 +00:00
<text/>
</element>
</define>
<define name='domain'>
<element name='domain'>
<attribute name='type'>
2010-03-01 20:09:26 +01:00
<choice>
<value>qemu</value>
<value>kqemu</value>
<value>kvm</value>
<value>xen</value>
<value>uml</value>
<value>lxc</value>
<value>openvz</value>
<value>test</value>
</choice>
2009-01-27 15:29:53 +00:00
</attribute>
<optional>
2010-03-01 20:09:26 +01:00
<ref name='emulator'/>
2009-01-27 15:29:53 +00:00
</optional>
2009-09-10 09:47:57 +01:00
<zeroOrMore>
2010-03-01 20:09:26 +01:00
<ref name='machine'/>
2009-09-10 09:47:57 +01:00
</zeroOrMore>
2009-01-27 15:29:53 +00:00
</element>
</define>
<define name='features'>
<element name='features'>
2012-08-02 13:23:16 +02:00
<interleave>
<optional>
<element name='pae'>
<empty/>
</element>
</optional>
<optional>
<element name='nonpae'>
<empty/>
</element>
</optional>
<optional>
<element name='ia64_be'>
<empty/>
</element>
</optional>
<optional>
<element name='acpi'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='apic'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
<optional>
<element name='cpuselection'>
<empty/>
</element>
</optional>
<optional>
<element name='deviceboot'>
<empty/>
</element>
</optional>
2014-03-17 16:19:44 +01:00
<optional>
<element name='disksnapshot'>
<ref name='featuretoggle'/>
<empty/>
</element>
</optional>
2012-08-02 13:23:16 +02:00
</interleave>
2009-01-27 15:29:53 +00:00
</element>
</define>
<define name='featuretoggle'>
<attribute name='toggle'>
2014-09-08 08:06:35 +02:00
<ref name="virYesNo"/>
2009-01-27 15:29:53 +00:00
</attribute>
<attribute name='default'>
2014-09-08 08:06:35 +02:00
<ref name="virOnOff"/>
2009-01-27 15:29:53 +00:00
</attribute>
</define>
2009-12-18 14:37:09 +01:00
<define name='featureName'>
<data type='string'>
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
</data>
</define>
2014-06-06 18:12:51 +02:00
<define name='pagesElem'>
<element name='pages'>
<optional>
<attribute name='unit'>
<ref name='unit'/>
</attribute>
</optional>
<attribute name='size'>
<ref name='unsignedInt'/>
</attribute>
<ref name='unsignedInt'/>
</element>
</define>
2009-01-27 15:29:53 +00:00
</grammar>