mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
schema: Separate CPU related definitions into cputypes.rng
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
d4c007e6d5
commit
85105b0a4c
135
docs/schemas/cputypes.rng
Normal file
135
docs/schemas/cputypes.rng
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- CPU-related definitions used in multiple grammars -->
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
|
||||
<define name="cpuMode">
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>custom</value>
|
||||
<value>host-model</value>
|
||||
<value>host-passthrough</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name="cpuMatch">
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>minimum</value>
|
||||
<value>exact</value>
|
||||
<value>strict</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name="cpuModel">
|
||||
<element name="model">
|
||||
<optional>
|
||||
<attribute name="fallback">
|
||||
<choice>
|
||||
<value>allow</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="vendor_id">
|
||||
<data type="string">
|
||||
<param name='pattern'>[^,]{12}</param>
|
||||
</data>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuVendor">
|
||||
<element name="vendor">
|
||||
<text/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuFeature">
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
<choice>
|
||||
<value>force</value>
|
||||
<value>require</value>
|
||||
<value>optional</value>
|
||||
<value>disable</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="name">
|
||||
<ref name="featureName"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuTopology">
|
||||
<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>
|
||||
</define>
|
||||
|
||||
<define name="cpuNuma">
|
||||
<element name="numa">
|
||||
<oneOrMore>
|
||||
<ref name="numaCell"/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="numaCell">
|
||||
<element name="cell">
|
||||
<optional>
|
||||
<attribute name="id">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="cpus">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
<attribute name="memory">
|
||||
<ref name="memoryKB"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="unit">
|
||||
<ref name="unit"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="memAccess">
|
||||
<choice>
|
||||
<value>shared</value>
|
||||
<value>private</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!-- Memory as an attribute is in KiB, no way to express a unit -->
|
||||
<define name="memoryKB">
|
||||
<data type="unsignedLong"/>
|
||||
</define>
|
||||
<define name="featureName">
|
||||
<data type="string">
|
||||
<param name='pattern'>[a-zA-Z0-9\-_\.]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
</grammar>
|
@ -4,6 +4,7 @@
|
||||
<include href='basictypes.rng'/>
|
||||
<include href='storagecommon.rng'/>
|
||||
<include href='networkcommon.rng'/>
|
||||
<include href='cputypes.rng'/>
|
||||
|
||||
<!--
|
||||
description and title element, may be placed anywhere under the root
|
||||
@ -4414,125 +4415,6 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuMode">
|
||||
<attribute name="mode">
|
||||
<choice>
|
||||
<value>custom</value>
|
||||
<value>host-model</value>
|
||||
<value>host-passthrough</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name="cpuMatch">
|
||||
<attribute name="match">
|
||||
<choice>
|
||||
<value>minimum</value>
|
||||
<value>exact</value>
|
||||
<value>strict</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</define>
|
||||
|
||||
<define name="cpuModel">
|
||||
<element name="model">
|
||||
<optional>
|
||||
<attribute name="fallback">
|
||||
<choice>
|
||||
<value>allow</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="vendor_id">
|
||||
<data type="string">
|
||||
<param name='pattern'>[^,]{12}</param>
|
||||
</data>
|
||||
</attribute>
|
||||
</optional>
|
||||
<choice>
|
||||
<text/>
|
||||
<empty/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuVendor">
|
||||
<element name="vendor">
|
||||
<text/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuFeature">
|
||||
<element name="feature">
|
||||
<attribute name="policy">
|
||||
<choice>
|
||||
<value>force</value>
|
||||
<value>require</value>
|
||||
<value>optional</value>
|
||||
<value>disable</value>
|
||||
<value>forbid</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<attribute name="name">
|
||||
<ref name="featureName"/>
|
||||
</attribute>
|
||||
<empty/>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="cpuTopology">
|
||||
<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>
|
||||
</define>
|
||||
|
||||
<define name="cpuNuma">
|
||||
<element name="numa">
|
||||
<oneOrMore>
|
||||
<ref name="numaCell"/>
|
||||
</oneOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="numaCell">
|
||||
<element name="cell">
|
||||
<optional>
|
||||
<attribute name="id">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="cpus">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
<attribute name="memory">
|
||||
<ref name="memoryKB"/>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="unit">
|
||||
<ref name="unit"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="memAccess">
|
||||
<choice>
|
||||
<value>shared</value>
|
||||
<value>private</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<!--
|
||||
System information specification:
|
||||
Placeholder for system specific informations likes the ones
|
||||
@ -5477,10 +5359,6 @@
|
||||
<param name="maxInclusive">1000</param>
|
||||
</data>
|
||||
</define>
|
||||
<!-- Memory as an attribute is in KiB, no way to express a unit -->
|
||||
<define name="memoryKB">
|
||||
<data type="unsignedLong"/>
|
||||
</define>
|
||||
<define name="domainName">
|
||||
<data type="string">
|
||||
<!-- Use literal newline instead of \n for bug in libxml2 2.7.6 -->
|
||||
@ -5564,11 +5442,6 @@
|
||||
<param name="pattern">[0-9]{1,20}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="featureName">
|
||||
<data type="string">
|
||||
<param name='pattern'>[a-zA-Z0-9\-_\.]+</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="timeDelta">
|
||||
<data type="string">
|
||||
<param name="pattern">(-|\+)?[0-9]+</param>
|
||||
|
Loading…
Reference in New Issue
Block a user