config tool:add restriction for some parameters

add value restriction for memory size and max pt irq entry

Tracked-On: #7407
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
This commit is contained in:
hangliu1 2022-05-05 02:51:41 -04:00 committed by acrnsi-robot
parent fd76e342ef
commit 0c5f7b5985
2 changed files with 19 additions and 2 deletions

View File

@ -118,10 +118,18 @@ The size is a subset of the VM's total memory size specified on the Basic tab.</
<xs:complexType name="MemoryInfo">
<xs:all>
<xs:element name="size" type="xs:integer" minOccurs="0" default="256">
<xs:element name="size" minOccurs="0" default="256">
<xs:annotation acrn:title="Memory size (MB)" acrn:views="basic" acrn:applicable-vms="pre-launched, post-launched">
<xs:documentation>Specify the physical memory size allocated to this VM in megabytes.</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="hpa_region" type="HPARegionType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation acrn:title="Physical memory segmentation" acrn:views="advanced" acrn:applicable-vms="pre-launched" >

View File

@ -198,10 +198,19 @@ These settings can only be changed at build time.</xs:documentation>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="MAX_PT_IRQ_ENTRIES" type="xs:integer" default="256">
<xs:element name="MAX_PT_IRQ_ENTRIES" default="256">
<xs:annotation acrn:title="Max passthrough IRQ entries" acrn:views="advanced">
<xs:documentation>Specify the maximum number of interrupt request (IRQ) entries from all passthrough devices.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:annotation>
<xs:documentation>Integer from 1 to 1024.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<xs:minInclusive value="1" />
<xs:maxInclusive value="1024" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="MAX_MSIX_TABLE_NUM" default="64">
<xs:annotation acrn:title="Max MSI-X tables" acrn:views="advanced">