domaincaps.rng 5.9 KB
Newer Older
M
Michal Privoznik 已提交
1 2 3 4
<?xml version="1.0"?>
<!-- A Relax NG schema for the libvirt domain capabilities XML format -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href='basictypes.rng'/>
5
  <include href='cputypes.rng'/>
M
Michal Privoznik 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19
  <start>
    <ref name='domainCapabilities'/>
  </start>


  <define name='domainCapabilities'>
    <element name='domainCapabilities'>
      <interleave>
        <element name='path'>
          <ref name="absFilePath"/>
        </element>
        <element name='domain'>
          <text/>
        </element>
20 21 22 23 24
        <optional>
          <element name='machine'>
            <text/>
          </element>
        </optional>
M
Michal Privoznik 已提交
25 26 27 28 29 30
        <element name='arch'>
          <text/>
        </element>
        <optional>
          <ref name='vcpu'/>
        </optional>
31 32 33
        <optional>
          <ref name='iothreads'/>
        </optional>
34 35 36
        <optional>
          <ref name='os'/>
        </optional>
37 38 39
        <optional>
          <ref name='cpu'/>
        </optional>
M
Michal Privoznik 已提交
40 41 42
        <optional>
          <ref name='devices'/>
        </optional>
43 44 45
        <optional>
          <ref name='features'/>
        </optional>
M
Michal Privoznik 已提交
46 47 48 49 50 51 52 53 54 55 56 57 58
      </interleave>
    </element>
  </define>

  <define name='vcpu'>
    <element name='vcpu'>
      <attribute name='max'>
        <ref name='unsignedInt'/>
      </attribute>
      <empty/>
    </element>
  </define>

59 60 61 62 63 64 65
  <define name='iothreads'>
    <element name='iothreads'>
      <ref name='supported'/>
      <empty/>
    </element>
  </define>

66 67 68
  <define name='loader'>
    <element name='loader'>
      <ref name='supported'/>
69 70 71
      <optional>
        <ref name='value'/>
      </optional>
72 73 74 75 76 77 78 79
      <ref name='enum'/>
    </element>
  </define>

  <define name='os'>
    <element name='os'>
      <interleave>
        <ref name='supported'/>
80
        <ref name='enum'/>
81 82 83 84 85 86 87
        <optional>
          <ref name='loader'/>
        </optional>
      </interleave>
    </element>
  </define>

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
  <define name='cpu'>
    <element name='cpu'>
      <ref name='cpuHost'/>
      <ref name='cpuHostModel'/>
      <ref name='cpuCustom'/>
    </element>
  </define>

  <define name='cpuHost'>
    <element name='mode'>
      <attribute name='name'>
        <value>host-passthrough</value>
      </attribute>
      <ref name='supported'/>
    </element>
  </define>

  <define name='cpuHostModel'>
    <element name='mode'>
      <attribute name='name'>
        <value>host-model</value>
      </attribute>
      <ref name='supported'/>
111 112 113 114 115 116 117 118 119
      <optional>
        <ref name="cpuModel"/>
        <optional>
          <ref name="cpuVendor"/>
        </optional>
        <zeroOrMore>
          <ref name="cpuFeature"/>
        </zeroOrMore>
      </optional>
120 121 122 123 124 125 126 127 128 129 130
    </element>
  </define>

  <define name='cpuCustom'>
    <element name='mode'>
      <attribute name='name'>
        <value>custom</value>
      </attribute>
      <ref name='supported'/>
      <zeroOrMore>
        <element name='model'>
J
Jiri Denemark 已提交
131 132 133 134 135 136 137
          <attribute name='usable'>
            <choice>
              <value>yes</value>
              <value>no</value>
              <value>unknown</value>
            </choice>
          </attribute>
138 139 140 141 142 143
          <text/>
        </element>
      </zeroOrMore>
    </element>
  </define>

M
Michal Privoznik 已提交
144 145
  <define name='devices'>
    <element name='devices'>
146
      <optional>
M
Michal Privoznik 已提交
147
        <ref name='disk'/>
148 149
      </optional>
      <optional>
150
        <ref name='graphics'/>
151 152
      </optional>
      <optional>
153
        <ref name='video'/>
154 155
      </optional>
      <optional>
M
Michal Privoznik 已提交
156
        <ref name='hostdev'/>
157
      </optional>
158 159 160
      <optional>
        <ref name='rng'/>
      </optional>
M
Michal Privoznik 已提交
161 162 163 164 165 166 167 168 169 170
    </element>
  </define>

  <define name='disk'>
    <element name='disk'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

171 172 173 174 175 176 177
  <define name='graphics'>
    <element name='graphics'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

178 179 180 181 182 183 184
  <define name='video'>
    <element name='video'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

M
Michal Privoznik 已提交
185 186 187 188 189 190 191
  <define name='hostdev'>
    <element name='hostdev'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

192 193 194 195 196 197 198
  <define name='rng'>
    <element name='rng'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

199 200
  <define name='features'>
    <element name='features'>
201
      <optional>
202
        <ref name='gic'/>
203 204
      </optional>
      <optional>
205
        <ref name='vmcoreinfo'/>
206 207
      </optional>
      <optional>
208
        <ref name='vmgenid'/>
209
      </optional>
210 211 212
      <optional>
        <ref name='backingStoreInput'/>
      </optional>
213
      <optional>
214
        <ref name='sev'/>
215
      </optional>
216 217 218 219 220 221 222 223 224 225
    </element>
  </define>

  <define name='gic'>
    <element name='gic'>
      <ref name='supported'/>
      <ref name='enum'/>
    </element>
  </define>

226 227 228 229 230 231
  <define name='vmcoreinfo'>
    <element name='vmcoreinfo'>
      <ref name='supported'/>
    </element>
  </define>

232 233 234 235 236 237
  <define name='vmgenid'>
    <element name='genid'>
      <ref name='supported'/>
    </element>
  </define>

238 239 240 241 242 243
  <define name='backingStoreInput'>
    <element name='backingStoreInput'>
      <ref name='supported'/>
    </element>
  </define>

244 245
  <define name='sev'>
    <element name='sev'>
246 247 248 249 250 251 252 253 254
      <ref name='supported'/>
      <optional>
        <element name='cbitpos'>
          <data type='unsignedInt'/>
        </element>
        <element name='reducedPhysBits'>
          <data type='unsignedInt'/>
        </element>
      </optional>
255 256 257
    </element>
  </define>

258 259 260 261 262 263 264 265
  <define name='value'>
    <zeroOrMore>
      <element name='value'>
        <text/>
      </element>
    </zeroOrMore>
  </define>

M
Michal Privoznik 已提交
266 267
  <define name='supported'>
    <attribute name='supported'>
268
      <ref name="virYesNo"/>
M
Michal Privoznik 已提交
269 270 271 272 273 274 275 276 277
    </attribute>
  </define>

  <define name='enum'>
    <zeroOrMore>
      <element name='enum'>
        <attribute name='name'>
          <text/>
        </attribute>
278
        <ref name='value'/>
M
Michal Privoznik 已提交
279 280 281 282
      </element>
    </zeroOrMore>
  </define>
</grammar>