[PATCH 2/2] config_tools: add restriction for Maximum Virtual CLOS configuration


Kunhui Li
 

Add restriction for Maximum Virtual CLOS configuration that don't allow
negative numbers.

Tracked-On: #7530
Signed-off-by: Kunhui-Li <kunhuix.li@...>
---
misc/config_tools/schema/config.xsd | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd
index 006a5ad9f..02367ba6d 100644
--- a/misc/config_tools/schema/config.xsd
+++ b/misc/config_tools/schema/config.xsd
@@ -351,10 +351,18 @@ Refer to :ref:`vuart_config` for detailed vUART settings.</xs:documentation>
<xs:documentation>Enable nested virtualization for KVM.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="virtual_cat_number" type="xs:integer" default="0" minOccurs="0">
+ <xs:element name="virtual_cat_number" default="0" minOccurs="0">
<xs:annotation acrn:title="Maximum virtual CLOS" acrn:applicable-vms="pre-launched, post-launched" acrn:views="advanced">
<xs:documentation>Max number of virtual CLOS MASK</xs:documentation>
</xs:annotation>
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>Integer value is not below zero.</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0" />
+ </xs:restriction>
+ </xs:simpleType>
</xs:element>
<xs:element name="virtual_cat_support" type="Boolean" default="n" minOccurs="0">
<xs:annotation acrn:title="VM Virtual Cache Allocation Tech" acrn:applicable-vms="pre-launched, post-launched" acrn:views="advanced">
--
2.25.1


Junjie Mao
 

Kunhui-Li <kunhuix.li@...> writes:

Add restriction for Maximum Virtual CLOS configuration that don't allow
negative numbers.

Tracked-On: #7530
Signed-off-by: Kunhui-Li <kunhuix.li@...>
Reviewed-by: Junjie Mao <junjie.mao@...>

--
Best Regards
Junjie Mao

---
misc/config_tools/schema/config.xsd | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd
index 006a5ad9f..02367ba6d 100644
--- a/misc/config_tools/schema/config.xsd
+++ b/misc/config_tools/schema/config.xsd
@@ -351,10 +351,18 @@ Refer to :ref:`vuart_config` for detailed vUART settings.</xs:documentation>
<xs:documentation>Enable nested virtualization for KVM.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="virtual_cat_number" type="xs:integer" default="0" minOccurs="0">
+ <xs:element name="virtual_cat_number" default="0" minOccurs="0">
<xs:annotation acrn:title="Maximum virtual CLOS" acrn:applicable-vms="pre-launched, post-launched" acrn:views="advanced">
<xs:documentation>Max number of virtual CLOS MASK</xs:documentation>
</xs:annotation>
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>Integer value is not below zero.</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0" />
+ </xs:restriction>
+ </xs:simpleType>
</xs:element>
<xs:element name="virtual_cat_support" type="Boolean" default="n" minOccurs="0">
<xs:annotation acrn:title="VM Virtual Cache Allocation Tech" acrn:applicable-vms="pre-launched, post-launched" acrn:views="advanced">