]> xenbits.xensource.com Git - libvirt.git/commitdiff
schema: Fix capability grammar for pagesElem
authorJohn Ferlan <jferlan@redhat.com>
Sat, 19 May 2018 11:02:47 +0000 (07:02 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 25 May 2018 13:36:42 +0000 (09:36 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1572491

Commit id '02129b7c0' added a single pagesElem for slightly
different purposes. One usage was an output for host page size
listing and the other for NUMA supported page sizes. For the
former, only the pages unit and size are formatted, while for
the latter the pages unit, size, and availability data is formatted.

The virt-xml-validate would fail because it expected something
extra in the host page size output. So split up pagesElem a bit
and create pagesHost and pagesNuma for the differences.

Modify some capabilityschemadata output to have the output - even
though the results may not be realistic with respect to the
original incarnation of the data.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by Michal Privoznik <mprivozn@redhat.com>

docs/schemas/capability.rng
tests/capabilityschemadata/caps-test2.xml
tests/capabilityschemadata/caps-test3.xml

index e1b7858540d6239adf64e24008ddcc698e43d923..66c5de62e5168ca863dbcf7be8367b8581faf9db 100644 (file)
       </element>
     </zeroOrMore>
     <zeroOrMore>
-      <ref name='pagesElem'/>
+      <ref name='pagesHost'/>
     </zeroOrMore>
   </define>
 
       </optional>
 
       <zeroOrMore>
-        <ref name='pagesElem'/>
+        <ref name='pagesNuma'/>
       </zeroOrMore>
 
       <optional>
     </data>
   </define>
 
-  <define name='pagesElem'>
+  <define name='pagesHost'>
     <element name='pages'>
-      <optional>
-        <attribute name='unit'>
-          <ref name='unit'/>
-        </attribute>
-      </optional>
-      <attribute name='size'>
-        <ref name='unsignedInt'/>
-      </attribute>
+      <ref name='pagesElem'/>
+    </element>
+  </define>
+  <define name='pagesNuma'>
+    <element name='pages'>
+      <ref name='pagesElem'/>
       <ref name='unsignedInt'/>
     </element>
   </define>
+  <define name='pagesElem'>
+    <optional>
+      <attribute name='unit'>
+        <ref name='unit'/>
+      </attribute>
+    </optional>
+    <attribute name='size'>
+      <ref name='unsignedInt'/>
+    </attribute>
+  </define>
 </grammar>
index 652fc71e0b82e076cdd650d68fa42b5d01570051..125a3229988984cb986793d1c6e419536050e45c 100644 (file)
@@ -24,6 +24,9 @@
       <feature name='acpi'/>
       <feature name='ds'/>
       <feature name='vme'/>
+      <pages unit='KiB' size='4'/>
+      <pages unit='KiB' size='2048'/>
+      <pages unit='KiB' size='1048576'/>
     </cpu>
     <power_management>
       <suspend_mem/>
index 479db30612ae92e88ce929912da2299c463bc8b6..8294f44425be34400cee30ab197c211bf2112d51 100644 (file)
@@ -28,6 +28,9 @@
       <feature name='acpi'/>
       <feature name='ds'/>
       <feature name='vme'/>
+      <pages unit='KiB' size='4'/>
+      <pages unit='KiB' size='2048'/>
+      <pages unit='KiB' size='1048576'/>
     </cpu>
     <power_management>
       <suspend_disk/>
@@ -42,6 +45,9 @@
       <cells num='2'>
         <cell id='0'>
           <memory unit='KiB'>12572412</memory>
+          <pages unit='KiB' size='4'>4011249</pages>
+          <pages unit='KiB' size='2048'>0</pages>
+          <pages unit='KiB' size='1048576'>0</pages>
           <cpus num='12'>
             <cpu id='0'/>
             <cpu id='2'/>