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="LoadOrderType">
7  <xs:annotation>
8    <xs:documentation>Current supported VM types are:
9
10- ``SERVICE_VM`` Service VM
11- ``PRE_LAUNCHED_VM`` pre-launched VM
12- ``POST_LAUNCHED_VM`` post-launched VM</xs:documentation>
13  </xs:annotation>
14  <xs:restriction base="xs:string">
15    <xs:enumeration value="SERVICE_VM" />
16    <xs:enumeration value="PRE_LAUNCHED_VM" />
17    <xs:enumeration value="POST_LAUNCHED_VM" />
18  </xs:restriction>
19</xs:simpleType>
20
21<xs:simpleType name="VMType">
22  <xs:annotation>
23    <xs:documentation>Current supported VM types are:
24
25- ``Real-time`` for time-sensitive applications (not applicable to the service VM).
26- ``Standard`` for general-purpose applications, such as human-machine interface (HMI).
27</xs:documentation>
28  </xs:annotation>
29  <xs:restriction base="xs:string">
30    <xs:enumeration value="RTVM" >
31      <xs:annotation acrn:title="Real-time" acrn:applicable-vms="pre-launched, post-launched" />
32    </xs:enumeration>
33    <xs:enumeration value="STANDARD_VM">
34      <xs:annotation acrn:title="Standard" />
35    </xs:enumeration>
36    <xs:enumeration value="TEE_VM">
37      <xs:annotation acrn:views="" />
38    </xs:enumeration>
39    <xs:enumeration value="REE_VM">
40      <xs:annotation acrn:views="" />
41    </xs:enumeration>
42  </xs:restriction>
43</xs:simpleType>
44
45<xs:complexType name="CPUAffinityConfiguration">
46  <xs:all>
47    <xs:element name="pcpu_id" type="xs:integer">
48      <xs:annotation acrn:title="pCPU ID"
49                     acrn:options="//processors//thread/cpu_id/text()"
50                     acrn:option-names="if (count(distinct-values(//processors//thread/core_type)) &gt; 1)
51                                        then (for $thread in //processors//thread return concat($thread/cpu_id, ' (', if ($thread/core_type = 'Core') then 'P-Core' else 'E-Core', ')'))
52                                        else //processors//thread/cpu_id/text()"
53                     acrn:options-sorted-by="int">
54        <xs:documentation>ID of the pCPU that this VM's vCPU is allowed to pin to.</xs:documentation>
55      </xs:annotation>
56    </xs:element>
57    <xs:element name="real_time_vcpu" type="Boolean" default="n">
58      <xs:annotation acrn:title="Real-time vCPU">
59          <xs:documentation>Check "Real-time vCPU" for each vCPU used for real-time workloads. Then configure cache usage in the Hypervisor/Advanced/Cache Allocation Technology (CAT) configuration option. There you'll see Real-time vCPUs separated from vCPUs you allocate to other tasks.</xs:documentation>
60          <xs:documentation>See :ref:`rdt_configuration` for more details.</xs:documentation>
61      </xs:annotation>
62    </xs:element>
63  </xs:all>
64</xs:complexType>
65
66<xs:complexType name="CPUAffinityConfigurations">
67  <xs:sequence>
68    <xs:element name="pcpu" type="CPUAffinityConfiguration" minOccurs="0" maxOccurs="unbounded">
69      <xs:annotation acrn:title="pCPU list">
70        <xs:documentation>List of pCPU affinities.</xs:documentation>
71      </xs:annotation>
72    </xs:element>
73  </xs:sequence>
74</xs:complexType>
75
76<xs:complexType name="EPCSection">
77  <xs:sequence>
78    <xs:element name="base" type="HexFormat" default="0">
79      <xs:annotation acrn:title="EPC section base" acrn:applicable-vms="pre-launched"
80                     acrn:errormsg="'required': 'EPC section base is required.'">
81        <xs:documentation>Specify the enclave page cache (EPC) section base for Intel Software Guard Extensions (SGX). Must be page aligned.</xs:documentation>
82      </xs:annotation>
83    </xs:element>
84    <xs:element name="size" type="HexFormat" default="0">
85      <xs:annotation acrn:title="EPC section size (bytes)" acrn:applicable-vms="pre-launched"
86                     acrn:errormsg="'required': 'EPC section size is required.'">
87        <xs:documentation>Specify the enclave page cache (EPC) section size in bytes for Intel Software Guard Extensions (SGX). Must be page aligned.</xs:documentation>
88      </xs:annotation>
89    </xs:element>
90  </xs:sequence>
91</xs:complexType>
92
93<xs:complexType name="HPARegionType">
94  <xs:sequence>
95    <xs:element name="start_hpa" type="HexFormat">
96      <xs:annotation acrn:title="Start physical address"
97                     acrn:errormsg="'required': 'Physical memory base address is required.'">
98        <xs:documentation>Specify the starting address for non-contiguous allocation.</xs:documentation>
99      </xs:annotation>
100    </xs:element>
101    <xs:element name="size_hpa" type="xs:integer">
102      <xs:annotation acrn:title="Size (MB)"
103                     acrn:errormsg="'required': 'Physical memory size is required.'">
104        <xs:documentation>Specify the physical memory size for non-contiguous allocation in megabytes.
105The size is a subset of the VM's total memory size specified on the Basic tab.</xs:documentation>
106        </xs:annotation>
107    </xs:element>
108  </xs:sequence>
109</xs:complexType>
110
111<xs:complexType name="MemoryInfo">
112  <xs:all>
113    <xs:element name="size" minOccurs="0" default="1024">
114      <xs:annotation acrn:title="Memory size (MB)" acrn:views="basic" acrn:applicable-vms="pre-launched, post-launched">
115       <xs:documentation>Specify the physical memory size allocated to this VM in megabytes.</xs:documentation>
116      </xs:annotation>
117      <xs:simpleType>
118        <xs:annotation>
119          <xs:documentation>Integer value is not below zero.</xs:documentation>
120        </xs:annotation>
121        <xs:restriction base="xs:integer">
122          <xs:minInclusive value="0" />
123        </xs:restriction>
124      </xs:simpleType>
125    </xs:element>
126    <xs:element name="hpa_region" type="HPARegionType" minOccurs="0" maxOccurs="unbounded">
127      <xs:annotation acrn:title="Physical memory segmentation" acrn:views="advanced" acrn:applicable-vms="pre-launched" >
128        <xs:documentation>Specify Physical memory information for Prelaunched VM </xs:documentation>
129      </xs:annotation>
130    </xs:element>
131  </xs:all>
132</xs:complexType>
133
134<xs:complexType name="OSConfigurations">
135  <xs:all>
136    <xs:element name="kern_type" type="VMKernelType" default="KERNEL_BZIMAGE">
137      <xs:annotation acrn:title="Kernel image type">
138        <xs:documentation>Select the kernel image type so that the hypervisor can load it correctly.</xs:documentation>
139      </xs:annotation>
140    </xs:element>
141    <xs:element name="kern_mod" type="xs:string" default="Linux_bzImage">
142      <xs:annotation acrn:title="Kernel module tag"
143                     acrn:widget-options="'placeholder': 'An arbitrary string without white spaces. The same string shall be appended, in grub.conf, to the GRUB module containing the OS kernel.'">
144        <xs:documentation>Specify the tag for the kernel image that is used as a multiboot module. The tag's spelling must exactly match the module tag in the GRUB multiboot cmdline.</xs:documentation>
145      </xs:annotation>
146    </xs:element>
147    <xs:element name="ramdisk_mod" type="xs:string" minOccurs="0">
148      <xs:annotation acrn:title="RAMdisk module tag"
149                     acrn:widget-options="'placeholder': '(Optional) An arbitrary string without white spaces. The same string shall be appended, in grub.conf, to the GRUB module containing the OS ramdisk or initrd.'">
150        <xs:documentation>Specify the tag for the RAMdisk image that is used as a multiboot module. The tag's spelling must exactly match the module tag in the GRUB multiboot cmdline.</xs:documentation>
151      </xs:annotation>
152    </xs:element>
153    <xs:element name="bootargs" type="xs:string" default="rw rootwait root=/dev/nvme0n1p2 console=tty0 console=ttyS0 consoleblank=0 no_timer_check quiet loglevel=3 i915.nuclear_pageflip=1 swiotlb=131072">
154      <xs:annotation acrn:title="Kernel command-line parameters"
155                     acrn:widget-options="'placeholder': '(Optional) The command line options to be passed to the OS kernel.'">
156        <xs:documentation>Specify the command-line parameters that will be used to boot the kernel for this VM. See `Linux documentation &lt;https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html&gt;`__ for a list of parameters.</xs:documentation>
157      </xs:annotation>
158    </xs:element>
159    <xs:element name="kern_load_addr" type="KernLoadAddr" minOccurs="0">
160      <xs:annotation acrn:views="">
161        <xs:documentation>The loading address in host memory for the VM kernel.</xs:documentation>
162      </xs:annotation>
163    </xs:element>
164    <xs:element name="kern_entry_addr" type="KernEntryAddr" minOccurs="0">
165      <xs:annotation acrn:views="">
166        <xs:documentation>The entry address in host memory for the VM kernel.</xs:documentation>
167      </xs:annotation>
168    </xs:element>
169  </xs:all>
170</xs:complexType>
171
172<xs:simpleType name="VMKernelType">
173  <xs:annotation>
174    <xs:documentation>A string with either ``KERNEL_BZIMAGE`` or
175``KERNEL_RAWIMAGE``.</xs:documentation>
176  </xs:annotation>
177  <xs:restriction base="xs:string">
178    <xs:enumeration value="KERNEL_BZIMAGE" />
179    <xs:enumeration value="KERNEL_RAWIMAGE" >
180      <xs:annotation acrn:views="" />
181    </xs:enumeration>
182    <xs:enumeration value="KERNEL_ELF" />
183  </xs:restriction>
184</xs:simpleType>
185
186<xs:simpleType name="ConsoleVuartConfiguration">
187  <xs:annotation>
188    <xs:documentation>A string with either ``None``, ``COM Port 1``, ``COM Port 2``, ``COM Port 3``, or ``PCI``.</xs:documentation>
189  </xs:annotation>
190  <xs:restriction base="xs:string">
191    <xs:enumeration value="None" />
192    <xs:enumeration value="COM Port 1" />
193    <xs:enumeration value="COM Port 2" />
194    <xs:enumeration value="COM Port 3" />
195    <xs:enumeration value="COM Port 4" />
196    <xs:enumeration value="PCI" >
197      <xs:annotation acrn:views="" />
198    </xs:enumeration>
199  </xs:restriction>
200</xs:simpleType>
201
202<xs:simpleType name="VuartType">
203  <xs:annotation>
204    <xs:documentation>A string with value: ``legacy`` or ``pci``.</xs:documentation>
205  </xs:annotation>
206  <xs:restriction base="xs:string">
207    <xs:enumeration value="legacy">
208      <xs:annotation acrn:title="Legacy" />
209    </xs:enumeration>
210    <xs:enumeration value="pci">
211      <xs:annotation acrn:title="PCI" />
212    </xs:enumeration>
213  </xs:restriction>
214</xs:simpleType>
215
216<xs:complexType name="VuartEndpointType">
217  <xs:sequence>
218    <xs:element name="vm_name" type="xs:string">
219      <xs:annotation acrn:title="vUART VM name">
220        <xs:documentation>Specify the VM name of one end point for this vUART connection.</xs:documentation>
221      </xs:annotation>
222    </xs:element>
223    <xs:element name="io_port" type="HexFormat">
224      <xs:annotation acrn:title="Virtual I/O address" acrn:defaults="[hex(i) for i in range(0x9200, 0x9280, 8)]" acrn:unique-among="//vuart_connection/endpoint[vm_name=$parent/vm_name]/io_port/text()" acrn:widget-options="'placeholder':'An address in hexadecimal, e.g. 0x4000'">
225        <xs:documentation>Specify the COM base for each legacy virtual UART.</xs:documentation>
226      </xs:annotation>
227    </xs:element>
228    <xs:element name="vbdf" type="VBDFType">
229      <xs:annotation acrn:title="Virtual UART BDF" acrn:defaults="[f'00:{i:02x}.0' for i in range(16, 24)]" acrn:unique-among="//vuart_connection/endpoint[vm_name=$parent/vm_name]/vbdf/text()" acrn:widget-options="'placeholder':'00:[device].[function], e.g. 00:1c.0. All fields are in hexadecimal.'">
230        <xs:documentation>Specify the virtual Bus:Device.Function (BDF) for each PCI virtual UART. Virtual BDF is automatically assigned when the configuration is saved and can be changed if needed.</xs:documentation>
231      </xs:annotation>
232    </xs:element>
233  </xs:sequence>
234</xs:complexType>
235
236<xs:complexType name="VuartConnectionType">
237  <xs:sequence>
238      <xs:element name="name" type="xs:string">
239          <xs:annotation acrn:title="vUART name">
240        <xs:documentation>Specify the vUART name.</xs:documentation>
241      </xs:annotation>
242    </xs:element>
243    <xs:element name="type" type="VuartType" default="pci">
244      <xs:annotation acrn:title="vUART Type">
245        <xs:documentation>Select the communication virtual UART (vUART) type.</xs:documentation>
246      </xs:annotation>
247    </xs:element>
248    <xs:element name="endpoint" type="VuartEndpointType" minOccurs="2" maxOccurs="2">
249      <xs:annotation acrn:title="Virtual UART port">
250      </xs:annotation>
251    </xs:element>
252  </xs:sequence>
253</xs:complexType>
254
255<xs:complexType name="VuartConnectionsType">
256  <xs:sequence>
257    <xs:element name="vuart_connection" type="VuartConnectionType"  minOccurs="0" maxOccurs="unbounded"/>
258  </xs:sequence>
259</xs:complexType>
260
261<xs:complexType name="MMIOResourcesConfiguration">
262  <xs:all>
263    <xs:element name="TPM2" type="Boolean" default="n" minOccurs="0">
264      <xs:annotation acrn:title="TPM2 passthrough" acrn:applicable-vms="pre-launched">
265        <xs:documentation>Enable passthrough of the trusted platform module (TPM2) device to this VM.</xs:documentation>
266      </xs:annotation>
267    </xs:element>
268    <xs:element name="p2sb" type="Boolean" default="n" minOccurs="0">
269      <xs:annotation acrn:title="P2SB bridge passthrough" acrn:applicable-vms="pre-launched">
270        <xs:documentation>Enable passthrough of the Primary-to-Sideband (P2SB) bridge register access BAR to this VM.</xs:documentation>
271      </xs:annotation>
272    </xs:element>
273  </xs:all>
274</xs:complexType>
275
276<xs:complexType name="HiddenDevType">
277  <xs:all>
278    <xs:element name="HIDDEN_PDEV" type="VBDFType" minOccurs="0" maxOccurs="unbounded">
279      <xs:annotation acrn:views="">
280        <xs:documentation>Specify the hidden device vBDF</xs:documentation>
281      </xs:annotation>
282    </xs:element>
283  </xs:all>
284</xs:complexType>
285
286<xs:complexType name="PCIDevsConfiguration">
287  <xs:sequence>
288    <xs:element name="pci_dev" type="xs:string" minOccurs="0" maxOccurs="unbounded">
289      <xs:annotation acrn:title="PCI devices" acrn:options="//device[class]/@description" acrn:options-sorted-by="lambda s: (s.split(' ', maxsplit=1)[-1].split(':')[0], s.split(' ')[0])">
290        <xs:documentation>Select the PCI devices you want to assign to this virtual machine.</xs:documentation>
291      </xs:annotation>
292    </xs:element>
293  </xs:sequence>
294</xs:complexType>
295
296<xs:complexType name="USBDevsConfiguration">
297  <xs:sequence>
298    <xs:element name="usb_dev" type="xs:string" minOccurs="0" maxOccurs="unbounded">
299      <xs:annotation acrn:title="USB device assignment"
300                     acrn:options="//usb_device/@description" acrn:options-sorted-by="lambda s: s"
301                     acrn:errormsg="'required': 'USB device required. If no USB device is available, click the X at the top right corner of this entry to remove.'">
302        <xs:documentation>Select the USB physical bus and port number that will be emulated by the ACRN Device Model for this VM. USB 3.0, 2.0, and 1.0 are supported.</xs:documentation>
303      </xs:annotation>
304    </xs:element>
305  </xs:sequence>
306</xs:complexType>
307
308
309<xs:simpleType name="VirtioNetworkFrameworkType">
310  <xs:annotation>
311       <xs:documentation>A string with value: ``Kernel based (Virtual Host)`` or ``User space based (VBSU)``.</xs:documentation>
312  </xs:annotation>
313  <xs:restriction base="xs:string">
314    <xs:enumeration value="Kernel based (Virtual Host)" />
315    <xs:enumeration value="User space based (VBSU)" />
316  </xs:restriction>
317</xs:simpleType>
318
319<xs:complexType name="VirtioNetworkConfiguration">
320  <xs:sequence>
321    <xs:element name="virtio_framework" type="VirtioNetworkFrameworkType" default="User space based (VBSU)" minOccurs="0">
322      <xs:annotation acrn:title="Virtio framework">
323        <xs:documentation>Specify the virtio framework for specific virtio network device implemented in the Service VM.</xs:documentation>
324      </xs:annotation>
325    </xs:element>
326    <xs:element name="interface_name" minOccurs="0">
327      <xs:annotation acrn:title="Network interface name" acrn:widget-options="'placeholder': 'An arbitrary-long string with letters, digits, underscores or dashes.'">
328        <xs:documentation>Specify the network interface name that will appear in the Service VM. Use the `ip a` command in the Service VM to display the network interface names.</xs:documentation>
329      </xs:annotation>
330      <xs:simpleType>
331        <xs:annotation>
332          <xs:documentation>A string of letters, digits, ``_``, or ``-``.</xs:documentation>
333        </xs:annotation>
334        <xs:restriction base="xs:string">
335          <xs:pattern value="[a-zA-Z0-9_\-]+" />
336        </xs:restriction>
337      </xs:simpleType>
338    </xs:element>
339  </xs:sequence>
340</xs:complexType>
341
342<xs:simpleType name="VirtioConsoleUseType">
343  <xs:annotation>
344       <xs:documentation>A string with value: ``Virtio console`` or ``Virtio serial port``</xs:documentation>
345  </xs:annotation>
346  <xs:restriction base="xs:string">
347    <xs:enumeration value="Virtio console" >
348      <xs:annotation acrn:title="virtio serial port (as console)" />
349    </xs:enumeration>
350    <xs:enumeration value="Virtio serial port" >
351      <xs:annotation acrn:title="virtio serial port" />
352    </xs:enumeration>
353  </xs:restriction>
354</xs:simpleType>
355
356<xs:simpleType name="VirtioConsoleBackendType">
357  <xs:annotation>
358       <xs:documentation>A string with value: ``pty``, ``stdio``, or ``file``.</xs:documentation>
359  </xs:annotation>
360  <xs:restriction base="xs:string">
361    <xs:enumeration value="pty" />
362    <xs:enumeration value="stdio" />
363    <xs:enumeration value="file" />
364    <xs:enumeration value="sock client">
365      <xs:annotation acrn:views="" />
366    </xs:enumeration>
367    <xs:enumeration value="sock server">
368      <xs:annotation acrn:views="" />
369    </xs:enumeration>
370    <xs:enumeration value="tty" >
371      <xs:annotation acrn:views="" />
372    </xs:enumeration>
373  </xs:restriction>
374</xs:simpleType>
375
376<xs:simpleType name="VirtioGPUDisplayType">
377  <xs:annotation>
378       <xs:documentation>A string with value: ``Window`` and ``Full screen``.</xs:documentation>
379  </xs:annotation>
380  <xs:restriction base="xs:string">
381    <xs:enumeration value="Window" />
382    <xs:enumeration value="Full screen" />
383  </xs:restriction>
384</xs:simpleType>
385
386<xs:simpleType name="WindowResolutionsType">
387  <xs:annotation>
388       <xs:documentation>Values of display window resolutions.</xs:documentation>
389  </xs:annotation>
390  <xs:restriction base="xs:string">
391    <xs:enumeration value="1920x1080" />
392    <xs:enumeration value="1680x1050" />
393    <xs:enumeration value="1600x900" />
394    <xs:enumeration value="1440x900" />
395    <xs:enumeration value="1400x1050" />
396    <xs:enumeration value="1366x768" />
397    <xs:enumeration value="1360x768" />
398    <xs:enumeration value="1280x1024" />
399    <xs:enumeration value="1280x960" />
400    <xs:enumeration value="1280x800" />
401    <xs:enumeration value="1280x768" />
402    <xs:enumeration value="1280x720" />
403    <xs:enumeration value="1280x600" />
404    <xs:enumeration value="1152x864" />
405    <xs:enumeration value="1024x768" />
406    <xs:enumeration value="800x600" />
407  </xs:restriction>
408</xs:simpleType>
409
410<xs:complexType name="DisplayConfiguration">
411  <xs:all>
412    <xs:element name="monitor_id" type="xs:integer" minOccurs="0">
413      <xs:annotation acrn:title="Monitor ID" acrn:options="//display/text()" acrn:options-sorted-by="int">
414        <xs:documentation>Monitor id specifies which physical monitor the virtual display locates in full screen mode.</xs:documentation>
415      </xs:annotation>
416    </xs:element>
417    <xs:element name="window_resolutions" type="WindowResolutionsType" minOccurs="0">
418      <xs:annotation acrn:title="Window resolutions">
419        <xs:documentation>Windows resolution specifies the virtual window size of user vm.</xs:documentation>
420      </xs:annotation>
421    </xs:element>
422    <xs:element name="horizontal_offset" type="xs:integer" minOccurs="0">
423      <xs:annotation acrn:title="Horizontal offset (pixels)">
424        <xs:documentation>The abscissa (x-axis coordinate) of the left top point of the virtual window.</xs:documentation>
425      </xs:annotation>
426    </xs:element>
427    <xs:element name="vertical_offset" type="xs:integer" minOccurs="0">
428      <xs:annotation acrn:title="Vertical offset (pixels)">
429        <xs:documentation>The ordinate (x-axis coordinate) of the left top point of the virtual window.</xs:documentation>
430      </xs:annotation>
431    </xs:element>
432  </xs:all>
433</xs:complexType>
434
435<xs:complexType name="DisplaysConfiguration">
436  <xs:sequence>
437   <xs:element name="display" type="DisplayConfiguration" maxOccurs="unbounded"/>
438  </xs:sequence>
439</xs:complexType>
440
441<xs:complexType name="VirtioGPUConfiguration">
442  <xs:all>
443    <xs:element name="display_type" type="VirtioGPUDisplayType">
444      <xs:annotation acrn:title="Display type">
445        <xs:documentation>Display type provide virtual display for user vm with either full screen mode or virtual window mode.</xs:documentation>
446      </xs:annotation>
447    </xs:element>
448    <xs:element name="displays" type="DisplaysConfiguration"/>
449  </xs:all>
450</xs:complexType>
451
452<xs:complexType name="VirtioConsoleConfiguration">
453  <xs:all>
454    <xs:element name="use_type" type="VirtioConsoleUseType" default="Virtio console">
455      <xs:annotation acrn:title="Use type">
456        <xs:documentation>Specify device type in guest, ether HVC console when user config it as virtio console or /dev/vportXpY
457device file when user config it as virtio serial port, which can be read and written from the user space.</xs:documentation>
458      </xs:annotation>
459    </xs:element>
460    <xs:element name="backend_type" type="VirtioConsoleBackendType" default="stdio">
461      <xs:annotation acrn:title="Backend type">
462        <xs:documentation>Specify backend device type in service VM.</xs:documentation>
463      </xs:annotation>
464    </xs:element>
465    <xs:element name="output_file_path" type="xs:string" minOccurs="0">
466      <xs:annotation acrn:title="Output file path" acrn:widget-options="'placeholder': '/home/user/path/to/console_output.txt, needed only when backend type is file.'">
467        <xs:documentation>The output file path for the file backend type.</xs:documentation>
468      </xs:annotation>
469    </xs:element>
470    <xs:element name="sock_file_path" type="xs:string" minOccurs="0">
471      <xs:annotation acrn:title="Sock file path" acrn:widget-options="'placeholder': '/path/to/file.sock, needed only when backend type is sock client or server.'">
472        <xs:documentation>The sock file path for the sock server or client backend type.</xs:documentation>
473      </xs:annotation>
474    </xs:element>
475    <xs:element name="tty_device_path" type="xs:string" minOccurs="0">
476      <xs:annotation acrn:title="TTY device path" acrn:widget-options="'placeholder': '/dev/ttyX, needed only when backend type is tty.'">
477        <xs:documentation>The device path for the tty backend type.</xs:documentation>
478      </xs:annotation>
479    </xs:element>
480  </xs:all>
481</xs:complexType>
482
483<xs:complexType name="VirtioInputConfiguration">
484  <xs:sequence>
485    <xs:element name="backend_device_file" type="xs:string" minOccurs="0">
486      <xs:annotation acrn:title="Backend device file" acrn:widget-options="'placeholder': '/dev/input/eventX'"
487                     acrn:options="for $input in //inputs/input return concat('Device name: ', $input/name/text(), ', Device physical path: ', $input/phys/text())"
488                     acrn:options-sorted-by="lambda s: s">
489        <xs:documentation>Specifying backend device in service vm with device description.</xs:documentation>
490      </xs:annotation>
491    </xs:element>
492    <xs:element name="id" minOccurs="0">
493      <xs:annotation acrn:title="Guest virtio input device unique identifier" acrn:widget-options="'placeholder': 'An arbitrary-long string with letters, digits, underscores or dashes.'">
494        <xs:documentation>Specifying unique identifier to distinguish same devices in guest.</xs:documentation>
495      </xs:annotation>
496      <xs:simpleType>
497         <xs:annotation>
498              <xs:documentation>A string with letters, digits, ``_``, or ``-``.</xs:documentation>
499         </xs:annotation>
500        <xs:restriction base="xs:string">
501          <xs:pattern value="[a-zA-Z0-9_\-]*" />
502        </xs:restriction>
503      </xs:simpleType>
504    </xs:element>
505  </xs:sequence>
506</xs:complexType>
507
508<xs:simpleType name="vsockCIDType">
509    <xs:annotation acrn:widget-options="'placeholder': 'integer greater than 2'" />
510    <xs:restriction base="xs:integer">
511      <xs:minInclusive value="3" />
512      <xs:maxInclusive value="4294967294" />
513    </xs:restriction>
514</xs:simpleType>
515
516<xs:simpleType name="OSType">
517  <xs:annotation>
518    <xs:documentation>A string with either ``Non-Windows OS`` or  ``Windows OS``.</xs:documentation>
519  </xs:annotation>
520  <xs:restriction base="xs:string">
521    <xs:enumeration value="Non-Windows OS" />
522    <xs:enumeration value="Windows OS" />
523  </xs:restriction>
524</xs:simpleType>
525
526</xs:schema>
527