[Libosinfo] [osinfo-db PATCH v3 01/12] schema: Add support to Guest Features

Fabiano Fidêncio fidencio at redhat.com
Fri Jan 18 12:30:36 UTC 2019


Let's add support to have the list of features supported by OS. It's
quite important to note here that the feature being supported doesn't
mean it'll automatically work out of the box as it may depend on also
having whether QEMU or kernel have the right configuration.

The features supported by now are:
- cpu-hotplug
- hyperv
- hyperv-evmcs
- hyperv-frequencies
- hyperv-ipi
- hyperv-reenlightenment
- hyperv-relaxed
- hyperv-reset
- hyperv-runtime
- hyperv-spinlocks
- hyperv-synic
- hyperv-tlbflush
- hyperv-vapic
- hyperv-vendor-id
- hyperv-vpindex

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/schema/osinfo.rng.in | 54 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
index 3a42ac8..b342cb6 100644
--- a/data/schema/osinfo.rng.in
+++ b/data/schema/osinfo.rng.in
@@ -567,6 +567,48 @@
     </element>
   </define>
 
+  <!-- Those features mean that the OS is capable of supporting them.
+       It does *not* mean that its guaranteed to work as the features
+       may depend having them enabled on QEMU/kernel side. -->
+  <define name='features'>
+    <element name='features'>
+      <attribute name='arch'>
+        <ref name='archnamesorwildcard'/>
+      </attribute>
+      <oneOrMore>
+        <element name='feature'>
+          <choice>
+            <value>cpu-hotplug</value>
+            <value>hyperv</value>
+            <value>hyperv-evmcs</value>
+            <value>hyperv-frequencies</value>
+            <value>hyperv-ipi</value>
+            <value>hyperv-reenlightenment</value>
+            <value>hyperv-relaxed</value>
+            <value>hyperv-reset</value>
+            <value>hyperv-runtime</value>
+            <value>hyperv-spinlocks</value>
+            <value>hyperv-synic</value>
+            <value>hyperv-tlbflush</value>
+            <value>hyperv-vapic</value>
+            <value>hyperv-vendor-id</value>
+            <value>hyperv-vpindex</value>
+          </choice>
+          <optional>
+            <attribute name='supported'>
+              <ref name='bool'/>
+            </attribute>
+          </optional>
+          <optional>
+            <attribute name='state'>
+              <ref name='state'/>
+            </attribute>
+          </optional>
+        </element>
+      </oneOrMore>
+    </element>
+  </define>
+
   <define name='os'>
     <element name='os'>
       <interleave>
@@ -601,6 +643,9 @@
         <zeroOrMore>
           <ref name='driver'/>
         </zeroOrMore>
+        <zeroOrMore>
+          <ref name='features'/>
+        </zeroOrMore>
       </interleave>
     </element>
   </define>
@@ -842,6 +887,15 @@
     </choice>
   </define>
 
+  <define name='state'>
+    <choice>
+      <data type='string'>
+        <param name='pattern'>on|off</param>
+      </data>
+      <empty/>
+    </choice>
+  </define>
+
   <define name='num'>
     <data type="string">
       <param name="pattern">[0-9]+</param>
-- 
2.19.2




More information about the Libosinfo mailing list