board_inspector: add schema-based board checks

This patch adds schema-based board checks mechanism.
This provides integrators with a mechanism that XSD does
the actual board data check.

Tracked-On: #6689
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-01-20 21:21:26 +08:00
committed by acrnsi-robot
parent d66c994d33
commit 29e3dd7163
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<xs:schema
xmlns:xi="http://www.w3.org/2003/XInclude"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="acrn-config">
<xs:complexType>
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute processContents="skip"/>
<xi:include href="checks/platform_capabilities.xsd" xpointer="xpointer(id('root')/*)" />
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<xs:schema xml:id="root"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:acrn="https://projectacrn.org">
<xs:assert test="every $model in processors/model satisfies exists($model/capability[@id='vmx'])">
<xs:annotation acrn:severity="error">
<xs:documentation>Intel(R) Virtualization Technology Extension shall be enabled in BIOS.</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:schema>