]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: Allow counter element in host cpu definition
authorTim Wiederhake <twiederh@redhat.com>
Tue, 15 Dec 2020 12:16:48 +0000 (13:16 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Dec 2020 16:50:49 +0000 (17:50 +0100)
If the capabilities include a counter element, e.g.
  <counter name='tsc' frequency='2591999000' scaling='no'/>
the XML could not be validated:
  $ virsh capabilities > cap.xml
  $ virsh [hypervisor-]cpu-compare cap.xml --validate
  error: Failed to compare hypervisor CPU with cap.txt
  error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/cpu.rng
  Did not expect element counter there

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/schemas/cputypes.rng

index c4e762165964a3ef9a525148d3fde43f4b682625..f66bc62ba74cc0c09b5d0e7ca90093b1cb205120 100644 (file)
             </attribute>
           </element>
         </optional>
+        <optional>
+          <element name="counter">
+            <attribute name="name">
+              <text/>
+            </attribute>
+            <attribute name="frequency">
+              <ref name="positiveInteger"/>
+            </attribute>
+            <attribute name="scaling">
+              <ref name="virYesNo"/>
+            </attribute>
+          </element>
+        </optional>
         <optional>
           <ref name="cpuTopology"/>
         </optional>