1<?xml version="1.0"?> 2<xs:schema xml:id="root" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 4 xmlns:acrn="https://projectacrn.org"> 5 6<xs:simpleType name="Boolean"> 7 <xs:annotation acrn:widget="b-form-checkbox" acrn:widget-options="'value': 'y', 'unchecked-value': 'n'"> 8 <xs:documentation>A Boolean value, displayed as a check box.</xs:documentation> 9 </xs:annotation> 10 <xs:restriction base="xs:string"> 11 <xs:enumeration value="y" /> 12 <xs:enumeration value="n" /> 13 </xs:restriction> 14</xs:simpleType> 15 16<xs:simpleType name="HexFormat"> 17 <xs:annotation acrn:widget-options="'placeholder': 'A hexadecimal number with a leading 0x, e.g. 0x1000.'" 18 acrn:errormsg="'pattern': 'Must be a hexadecimal integer (case-insensitive).'"> 19 <xs:documentation>An Integer value in hexadecimal format (with a leading ``0x``).</xs:documentation> 20 </xs:annotation> 21 <xs:restriction base="xs:string"> 22 <xs:pattern value="0[Xx][0-9A-Fa-f]+|0" /> 23 </xs:restriction> 24</xs:simpleType> 25 26<xs:simpleType name="None"> 27 <xs:restriction base="xs:string"> 28 <xs:pattern value="[*]{0}" /> 29 </xs:restriction> 30</xs:simpleType> 31 32<xs:simpleType name="BuildType"> 33 <xs:annotation> 34 <xs:documentation>A string with value ``Release`` or ``Debug`` that indicates the build type of the hypervisor.</xs:documentation> 35 </xs:annotation> 36 <xs:restriction base="xs:string"> 37 <xs:enumeration value="release"> 38 <xs:annotation acrn:title="Release" /> 39 </xs:enumeration> 40 <xs:enumeration value="debug"> 41 <xs:annotation acrn:title="Debug" /> 42 </xs:enumeration> 43 </xs:restriction> 44</xs:simpleType> 45 46<xs:simpleType name="KernLoadAddr"> 47 <xs:annotation> 48 <xs:documentation>Either empty, or an Integer value in hexadecimal format.</xs:documentation> 49 </xs:annotation> 50 <xs:union memberTypes="None HexFormat" /> 51</xs:simpleType> 52 53<xs:simpleType name="KernEntryAddr"> 54 <xs:annotation> 55 <xs:documentation>Either empty, or an Integer value in hexadecimal format.</xs:documentation> 56 </xs:annotation> 57 <xs:union memberTypes="None HexFormat" /> 58</xs:simpleType> 59 60<xs:simpleType name="MaxMsixTableNumType"> 61 <xs:annotation> 62 <xs:documentation>Integer from 1 to 2048.</xs:documentation> 63 </xs:annotation> 64 <xs:restriction base="xs:integer"> 65 <xs:minInclusive value="1" /> 66 <xs:maxInclusive value="2048" /> 67 </xs:restriction> 68</xs:simpleType> 69 70<xs:simpleType name="MaxMsixTableSizeType"> 71 <xs:annotation> 72 <xs:documentation>Either empty, or an Integer value between 1 and 2048.</xs:documentation> 73 </xs:annotation> 74 <xs:union memberTypes="None MaxMsixTableNumType" /> 75</xs:simpleType> 76 77<xs:simpleType name="MemorySizeType"> 78 <xs:annotation> 79 <xs:documentation>An Integer value in hexadecimal format.</xs:documentation> 80 </xs:annotation> 81 <xs:union memberTypes="HexFormat" /> 82</xs:simpleType> 83 84<xs:simpleType name="LogLevelType"> 85 <xs:annotation> 86 <xs:documentation>An Integer from 0 to 5 representing log message 87severity and intent: 88 89- ``0: None``: No log at all. 90- ``1: Critical``: Messages about critical errors that cause the hypervisor to crash or hang (almost) immediately. 91- ``2: Error``: Messages about significant errors that affect the main functions (for example, launch of VMs) of ACRN hypervisor. 92- ``3: Warning``: Messages about detected abnormalities that have local effects on certain features. 93- ``4: Information``: Informational messages 94- ``5: Debug``: Debug-level messages 95 96A lower value has a higher severity. Log messages with a 97higher value (lower severity) are discarded.</xs:documentation> 98 </xs:annotation> 99 <xs:restriction base="xs:string"> 100 <xs:enumeration value="0"> 101 <xs:annotation acrn:title="0: None" /> 102 </xs:enumeration> 103 <xs:enumeration value="1"> 104 <xs:annotation acrn:title="1: Critical" /> 105 </xs:enumeration> 106 <xs:enumeration value="2"> 107 <xs:annotation acrn:title="2: Error" /> 108 </xs:enumeration> 109 <xs:enumeration value="3"> 110 <xs:annotation acrn:title="3: Warning" /> 111 </xs:enumeration> 112 <xs:enumeration value="4"> 113 <xs:annotation acrn:title="4: Information" /> 114 </xs:enumeration> 115 <xs:enumeration value="5"> 116 <xs:annotation acrn:title="5: Debug" /> 117 </xs:enumeration> 118 </xs:restriction> 119</xs:simpleType> 120 121<xs:simpleType name="SchedulerType"> 122 <xs:annotation> 123 <xs:documentation>A string specifying the scheduling option: 124 125- ``No-Operation (NOOP)``: The No-Operation (NOOP) scheduler means there is a 126 strict one-to-one mapping between vCPUs and pCPUs. 127- ``Borrowed Virtual Time``: The Borrowed Virtual Time (BVT) scheduler is a 128 virtual time-based scheduling algorithm. It dispatches the runnable thread with the 129 earliest effective virtual time. 130- ``Priority Based Scheduling``: The priority based scheduler supports vCPU scheduling based on pre-configured priorities. 131 </xs:documentation> 132 <xs:documentation>Read more about the available scheduling options in :ref:`cpu_sharing`.</xs:documentation> 133 </xs:annotation> 134 <xs:restriction base="xs:string"> 135 <xs:enumeration value="SCHED_NOOP"> 136 <xs:annotation acrn:title="No-Operation (NOOP)" /> 137 </xs:enumeration> 138 <xs:enumeration value="SCHED_IORR"> 139 <xs:annotation acrn:views="" /> 140 </xs:enumeration> 141 <xs:enumeration value="SCHED_BVT"> 142 <xs:annotation acrn:title="Borrowed Virtual Time" /> 143 </xs:enumeration> 144 <xs:enumeration value="SCHED_PRIO"> 145 <xs:annotation acrn:title="Priority Based Scheduling" /> 146 </xs:enumeration> 147 </xs:restriction> 148</xs:simpleType> 149 150<xs:simpleType name="policyType"> 151 <xs:annotation> 152 <xs:documentation>A string specifying the CPU frequency policy type: 153 154- ``Performance``: CPU runs at its maximum frequency. Enable hardware autonomous frequency selection if the system supports Hardware-Controlled Performance States (HWP). 155- ``Nominal``: CPU runs at its guaranteed frequency. 156 </xs:documentation> 157 </xs:annotation> 158 <xs:restriction base="xs:string"> 159 <xs:enumeration value="Performance"> 160 <xs:annotation acrn:title="Performance" /> 161 </xs:enumeration> 162 <xs:enumeration value="Nominal"> 163 <xs:annotation acrn:title="Nominal" /> 164 </xs:enumeration> 165 </xs:restriction> 166</xs:simpleType> 167 168<xs:simpleType name="PriorityType"> 169 <xs:annotation> 170 <xs:documentation>Two priorities are supported for priority based scheduler: 171 172- ``PRIO_LOW``: low priority for vCPU scheduling. 173- ``PRIO_HIGH``: high priority for vCPU scheduling. 174 </xs:documentation> 175 </xs:annotation> 176 <xs:restriction base="xs:string"> 177 <xs:enumeration value="PRIO_LOW" /> 178 <xs:enumeration value="PRIO_HIGH" /> 179 </xs:restriction> 180</xs:simpleType> 181 182<xs:simpleType name="SerialConsoleType"> 183 <xs:restriction base="xs:string"> 184 <xs:pattern value="(.*ttyS[\d]+)|None" /> 185 </xs:restriction> 186</xs:simpleType> 187 188<xs:simpleType name="VMNameType"> 189 <xs:annotation acrn:widget-options="'placeholder': 'A string with at most 15 non-space characters, e.g. Linux-VM-1.'" 190 acrn:errormsg="'pattern': 'Must NOT be longer than 15 characters or contain characters other than letters, digits, \'_\' and \'-\'.'"> 191 <xs:documentation>A string of up to 15 letters, digits, ``_``, or ``-``.</xs:documentation> 192 </xs:annotation> 193 <xs:restriction base="xs:string"> 194 <xs:pattern value="([a-zA-Z0-9_\-]){1,15}" /> 195 </xs:restriction> 196</xs:simpleType> 197 198<xs:simpleType name="VBDFType"> 199 <xs:annotation acrn:errormsg="'pattern': 'A string with up to two hex digits, a ``:``, two hex digits, a ``.``, and one digit between 0-7.'"> 200 <xs:documentation>A string with up to two hex digits, a ``:``, two hex digits, a ``.``, and one digit between 0-7.</xs:documentation> 201 </xs:annotation> 202 <xs:restriction base="xs:string"> 203 <xs:pattern value="[0-9A-Fa-f]{1,2}:[0-1][0-9A-Fa-f]\.[0-7]" /> 204 </xs:restriction> 205</xs:simpleType> 206 207<xs:simpleType name="ProviderType"> 208 <xs:annotation> 209 <xs:documentation>A string with value ``Hypervisor`` or ``Device Model``.</xs:documentation> 210 </xs:annotation> 211 <xs:restriction base="xs:string"> 212 <xs:enumeration value="Hypervisor" /> 213 <xs:enumeration value="Device Model" /> 214 </xs:restriction> 215</xs:simpleType> 216 217<xs:complexType name="IVSHMEMVM"> 218 <xs:sequence> 219 <xs:element name="VM_NAME" type="VMNameType" minOccurs="1"> 220 <xs:annotation acrn:title="Shared VMs"> 221 <xs:documentation>Name of the VM that uses this shared memory region.</xs:documentation> 222 </xs:annotation> 223 </xs:element> 224 <xs:element name="VBDF" type = "VBDFType"> 225 <xs:annotation acrn:title="Virtual BDF" acrn:defaults="[f'00:{i:02x}.0' for i in range(8, 16)]" acrn:unique-among="//IVSHMEM_VM[VM_NAME=$parent/VM_NAME]/VBDF/text()"> 226 <xs:documentation>Virtual BDF (Bus Device Function) is automatically assigned and can be changed if needed. Set in Hex.</xs:documentation> 227 </xs:annotation> 228 </xs:element> 229 </xs:sequence> 230</xs:complexType> 231 232<xs:complexType name="IVSHMEMVMS"> 233 <xs:annotation> 234 <xs:documentation>A sequence of Shared VM names and their Virtual BDF values.</xs:documentation> 235 </xs:annotation> 236 <xs:sequence> 237 <xs:element name="IVSHMEM_VM" type="IVSHMEMVM" maxOccurs="unbounded"> 238 <xs:annotation> 239 <xs:documentation>Select all VMs that use the shared memory region.</xs:documentation> 240 </xs:annotation> 241 </xs:element> 242 </xs:sequence> 243</xs:complexType> 244 245<xs:simpleType name="IVSHMEMSize"> 246 <xs:annotation> 247 <xs:documentation>An Integer with value a power of 2 between 2 and 512.</xs:documentation> 248 </xs:annotation> 249 <xs:restriction base="xs:integer"> 250 <xs:enumeration value="2" /> 251 <xs:enumeration value="4" /> 252 <xs:enumeration value="8" /> 253 <xs:enumeration value="16" /> 254 <xs:enumeration value="32" /> 255 <xs:enumeration value="64" /> 256 <xs:enumeration value="128" /> 257 <xs:enumeration value="256" /> 258 <xs:enumeration value="512" /> 259 </xs:restriction> 260</xs:simpleType> 261 262<xs:complexType name="IVSHMEMRegionType"> 263 <xs:all> 264 <xs:element name="NAME" minOccurs="1"> 265 <xs:annotation acrn:title="Region Name"> 266 <xs:documentation>Name of the shared memory region. The name must be between 1-27 characters and contain only letters, digits and "_".</xs:documentation> 267 </xs:annotation> 268 <xs:simpleType> 269 <xs:annotation> 270 <xs:documentation>Must be 1-27 characters and only letters, digits and "_".</xs:documentation> 271 </xs:annotation> 272 <xs:restriction base="xs:string"> 273 <xs:pattern value="\w{1,27}" /> 274 </xs:restriction> 275 </xs:simpleType> 276 </xs:element> 277 <xs:element name="PROVIDED_BY" type="ProviderType" default="Hypervisor"> 278 <xs:annotation acrn:title="Emulated by"> 279 <xs:documentation>Whether the shared memory region is emulated by the hypervisor or Device Model.</xs:documentation> 280 </xs:annotation> 281 </xs:element> 282 <xs:element name="IVSHMEM_SIZE" type="IVSHMEMSize" default="2"> 283 <xs:annotation acrn:title="Region Size (MB)"> 284 <xs:documentation>Select the size of the shared memory region 285in megabytes. The value should be a power of 2 286and no more than 512.</xs:documentation> 287 </xs:annotation> 288 </xs:element> 289 <xs:element name="IVSHMEM_REGION_ID" type="xs:string" default="0"> 290 <xs:annotation acrn:title="IVSHMEM Region ID"> 291 <xs:documentation>A stable identification when multiple shared memory regions are provided.</xs:documentation> 292 </xs:annotation> 293 </xs:element> 294 <xs:element name="IVSHMEM_VMS" type="IVSHMEMVMS"> 295 <xs:annotation acrn:title="Shared VMs"> 296 <xs:documentation>Select all VMs that use the shared memory region.</xs:documentation> 297 </xs:annotation> 298 </xs:element> 299 </xs:all> 300</xs:complexType> 301 302<xs:complexType name="IVSHMEMInfo"> 303 <xs:sequence> 304 <xs:element name="IVSHMEM_REGION" type="IVSHMEMRegionType" minOccurs="0" maxOccurs="unbounded"> 305 <xs:annotation> 306 <xs:documentation>Create a memory region for VMs to share: specify its name, size, and associated VMs.</xs:documentation> 307 </xs:annotation> 308 </xs:element> 309 </xs:sequence> 310</xs:complexType> 311 312<xs:complexType name="RDTType"> 313 <xs:sequence> 314 <xs:element name="RDT_ENABLED" type="Boolean" default="n"> 315 <xs:annotation acrn:title="Intel Resource Director Tech"> 316 <xs:documentation>Enable Cache Allocation Technology of Intel Resource Director Technology (RDT). If 317the board hardware does not support RDT, enabling this option is ignored.</xs:documentation> 318 </xs:annotation> 319 </xs:element> 320 <xs:element name="CDP_ENABLED" type="Boolean" default="n"> 321 <xs:annotation acrn:title="Code and Data Prioritization"> 322 <xs:documentation>Enable Code and Data Prioritization (CDP). CDP provides control over code and data placement in cache to improve an application's real-time performance.</xs:documentation> 323 </xs:annotation> 324 </xs:element> 325 <xs:element name="VCAT_ENABLED" type="Boolean" default="n"> 326 <xs:annotation acrn:title="Virtual Cache Allocation Tech"> 327 <xs:documentation>Enable virtualization of the Cache Allocation Technology (CAT) feature in RDT. CAT enables you to allocate cache to VMs, providing isolation to avoid performance interference from other VMs.</xs:documentation> 328 </xs:annotation> 329 </xs:element> 330 </xs:sequence> 331</xs:complexType> 332 333<xs:complexType name="SSRAMInfo"> 334 <xs:sequence> 335 <xs:element name="SSRAM_ENABLED" type="Boolean" default="n"> 336 <xs:annotation acrn:title="Software SRAM"> 337 <xs:documentation>Enable Software SRAM. This feature reserves memory buffers as always-cached memory to improve an application's real-time performance.</xs:documentation> 338 </xs:annotation> 339 </xs:element> 340 </xs:sequence> 341</xs:complexType> 342 343<xs:simpleType name="CacheType"> 344 <xs:annotation> 345 <xs:documentation>Option: Unified, Code, Data</xs:documentation> 346 </xs:annotation> 347 <xs:restriction base="xs:string"> 348 <xs:enumeration value="Unified"/> 349 <xs:enumeration value="Code" /> 350 <xs:enumeration value="Data" /> 351 </xs:restriction> 352</xs:simpleType> 353 354<xs:complexType name="CachePolicyType"> 355 <xs:sequence> 356 <xs:element name="VM" type="xs:string"> 357 <xs:annotation acrn:title="VM Name"> 358 <xs:documentation>The Name of VM</xs:documentation> 359 </xs:annotation> 360 </xs:element> 361 <xs:element name="VCPU" type="xs:integer"> 362 <xs:annotation acrn:title="Virtual CPU ID"> 363 <xs:documentation>The Virtual CPU index of VM</xs:documentation> 364 </xs:annotation> 365 </xs:element> 366 <xs:element name="TYPE" type="CacheType" minOccurs="1"> 367 <xs:annotation acrn:title="Cache Type"> 368 <xs:documentation>The Type of Cache Region</xs:documentation> 369 </xs:annotation> 370 </xs:element> 371 <xs:element name="CLOS_MASK" type="HexFormat"> 372 <xs:annotation acrn:title="Cache CLOS Mask"> 373 <xs:documentation>The Cache Region Mask</xs:documentation> 374 </xs:annotation> 375 </xs:element> 376 </xs:sequence> 377</xs:complexType> 378 379<xs:complexType name="CacheAllocationType"> 380 <xs:sequence> 381 <xs:element name="CACHE_ID" type="HexFormat"> 382 <xs:annotation acrn:title="Cache ID"> 383 <xs:documentation>The Cache Region index</xs:documentation> 384 </xs:annotation> 385 </xs:element> 386 <xs:element name="CACHE_LEVEL" type="xs:integer"> 387 <xs:annotation acrn:title="Cache Level"> 388 <xs:documentation>The Cache Region Level</xs:documentation> 389 </xs:annotation> 390 </xs:element> 391 <xs:element name="POLICY" type="CachePolicyType" minOccurs="1" maxOccurs="unbounded"/> 392 </xs:sequence> 393</xs:complexType> 394 395<xs:complexType name="CacheRegionType"> 396 <xs:sequence> 397 <xs:element name="CACHE_ALLOCATION" type="CacheAllocationType" minOccurs="1" maxOccurs="unbounded"/> 398 </xs:sequence> 399</xs:complexType> 400 401</xs:schema> 402