<?xml version="1.0"?>
<xs:schema xml:id="root"
	   xmlns:xs="http://www.w3.org/2001/XMLSchema"
	   xmlns:acrn="https://projectacrn.org">

<xs:simpleType name="LoadOrderType">
  <xs:annotation>
    <xs:documentation>Current supported VM types are:

- ``SERVICE_VM`` Service VM
- ``PRE_LAUNCHED_VM`` pre-launched VM
- ``POST_LAUNCHED_VM`` post-launched VM</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="SERVICE_VM" />
    <xs:enumeration value="PRE_LAUNCHED_VM" />
    <xs:enumeration value="POST_LAUNCHED_VM" />
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="VMType">
  <xs:annotation>
    <xs:documentation>Current supported VM types are:

- ``Real-time`` for time-sensitive applications (not applicable to the service VM).
- ``Standard`` for general-purpose applications, such as human-machine interface (HMI).
</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="RTVM" >
      <xs:annotation acrn:title="Real-time" acrn:applicable-vms="pre-launched, post-launched" />
    </xs:enumeration>
    <xs:enumeration value="STANDARD_VM">
      <xs:annotation acrn:title="Standard" />
    </xs:enumeration>
    <xs:enumeration value="TEE_VM">
      <xs:annotation acrn:views="" />
    </xs:enumeration>
    <xs:enumeration value="REE_VM">
      <xs:annotation acrn:views="" />
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="CPUAffinityConfiguration">
  <xs:all>
    <xs:element name="pcpu_id" type="xs:integer">
      <xs:annotation acrn:title="pCPU ID"
                     acrn:options="//processors//thread/cpu_id/text()"
                     acrn:option-names="if (count(distinct-values(//processors//thread/core_type)) &gt; 1)
                                        then (for $thread in //processors//thread return concat($thread/cpu_id, ' (', if ($thread/core_type = 'Core') then 'P-Core' else 'E-Core', ')'))
                                        else //processors//thread/cpu_id/text()"
                     acrn:options-sorted-by="int">
        <xs:documentation>ID of the pCPU that this VM's vCPU is allowed to pin to.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="real_time_vcpu" type="Boolean" default="n">
      <xs:annotation acrn:title="Real-time vCPU">
          <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>
          <xs:documentation>See :ref:`rdt_configuration` for more details.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="CPUAffinityConfigurations">
  <xs:sequence>
    <xs:element name="pcpu" type="CPUAffinityConfiguration" minOccurs="0" maxOccurs="unbounded">
      <xs:annotation acrn:title="pCPU list">
        <xs:documentation>List of pCPU affinities.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="EPCSection">
  <xs:sequence>
    <xs:element name="base" type="HexFormat" default="0">
      <xs:annotation acrn:title="EPC section base" acrn:applicable-vms="pre-launched"
                     acrn:errormsg="'required': 'EPC section base is required.'">
        <xs:documentation>Specify the enclave page cache (EPC) section base for Intel Software Guard Extensions (SGX). Must be page aligned.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="size" type="HexFormat" default="0">
      <xs:annotation acrn:title="EPC section size (bytes)" acrn:applicable-vms="pre-launched"
                     acrn:errormsg="'required': 'EPC section size is required.'">
        <xs:documentation>Specify the enclave page cache (EPC) section size in bytes for Intel Software Guard Extensions (SGX). Must be page aligned.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="HPARegionType">
  <xs:sequence>
    <xs:element name="start_hpa" type="HexFormat">
      <xs:annotation acrn:title="Start physical address"
                     acrn:errormsg="'required': 'Physical memory base address is required.'">
        <xs:documentation>Specify the starting address for non-contiguous allocation.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="size_hpa" type="xs:integer">
      <xs:annotation acrn:title="Size (MB)"
                     acrn:errormsg="'required': 'Physical memory size is required.'">
        <xs:documentation>Specify the physical memory size for non-contiguous allocation in megabytes.
The size is a subset of the VM's total memory size specified on the Basic tab.</xs:documentation>
        </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="MemoryInfo">
  <xs:all>
    <xs:element name="size" minOccurs="0" default="1024">
      <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" >
        <xs:documentation>Specify Physical memory information for Prelaunched VM </xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="OSConfigurations">
  <xs:all>
    <xs:element name="kern_type" type="VMKernelType" default="KERNEL_BZIMAGE">
      <xs:annotation acrn:title="Kernel image type">
        <xs:documentation>Select the kernel image type so that the hypervisor can load it correctly.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="kern_mod" type="xs:string" default="Linux_bzImage">
      <xs:annotation acrn:title="Kernel module tag"
                     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.'">
        <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>
      </xs:annotation>
    </xs:element>
    <xs:element name="ramdisk_mod" type="xs:string" minOccurs="0">
      <xs:annotation acrn:title="RAMdisk module tag"
                     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.'">
        <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>
      </xs:annotation>
    </xs:element>
    <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">
      <xs:annotation acrn:title="Kernel command-line parameters"
                     acrn:widget-options="'placeholder': '(Optional) The command line options to be passed to the OS kernel.'">
        <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>
      </xs:annotation>
    </xs:element>
    <xs:element name="kern_load_addr" type="KernLoadAddr" minOccurs="0">
      <xs:annotation acrn:views="">
        <xs:documentation>The loading address in host memory for the VM kernel.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="kern_entry_addr" type="KernEntryAddr" minOccurs="0">
      <xs:annotation acrn:views="">
        <xs:documentation>The entry address in host memory for the VM kernel.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:simpleType name="VMKernelType">
  <xs:annotation>
    <xs:documentation>A string with either ``KERNEL_BZIMAGE`` or
``KERNEL_RAWIMAGE``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="KERNEL_BZIMAGE" />
    <xs:enumeration value="KERNEL_RAWIMAGE" >
      <xs:annotation acrn:views="" />
    </xs:enumeration>
    <xs:enumeration value="KERNEL_ELF" />
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="ConsoleVuartConfiguration">
  <xs:annotation>
    <xs:documentation>A string with either ``None``, ``COM Port 1``, ``COM Port 2``, ``COM Port 3``, or ``PCI``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="None" />
    <xs:enumeration value="COM Port 1" />
    <xs:enumeration value="COM Port 2" />
    <xs:enumeration value="COM Port 3" />
    <xs:enumeration value="COM Port 4" />
    <xs:enumeration value="PCI" >
      <xs:annotation acrn:views="" />
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="VuartType">
  <xs:annotation>
    <xs:documentation>A string with value: ``legacy`` or ``pci``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="legacy">
      <xs:annotation acrn:title="Legacy" />
    </xs:enumeration>
    <xs:enumeration value="pci">
      <xs:annotation acrn:title="PCI" />
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="VuartEndpointType">
  <xs:sequence>
    <xs:element name="vm_name" type="xs:string">
      <xs:annotation acrn:title="vUART VM name">
        <xs:documentation>Specify the VM name of one end point for this vUART connection.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="io_port" type="HexFormat">
      <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'">
        <xs:documentation>Specify the COM base for each legacy virtual UART.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="vbdf" type="VBDFType">
      <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.'">
        <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>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="VuartConnectionType">
  <xs:sequence>
      <xs:element name="name" type="xs:string">
          <xs:annotation acrn:title="vUART name">
        <xs:documentation>Specify the vUART name.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="type" type="VuartType" default="pci">
      <xs:annotation acrn:title="vUART Type">
        <xs:documentation>Select the communication virtual UART (vUART) type.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="endpoint" type="VuartEndpointType" minOccurs="2" maxOccurs="2">
      <xs:annotation acrn:title="Virtual UART port">
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="VuartConnectionsType">
  <xs:sequence>
    <xs:element name="vuart_connection" type="VuartConnectionType"  minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="MMIOResourcesConfiguration">
  <xs:all>
    <xs:element name="TPM2" type="Boolean" default="n" minOccurs="0">
      <xs:annotation acrn:title="TPM2 passthrough" acrn:applicable-vms="pre-launched">
        <xs:documentation>Enable passthrough of the trusted platform module (TPM2) device to this VM.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="p2sb" type="Boolean" default="n" minOccurs="0">
      <xs:annotation acrn:title="P2SB bridge passthrough" acrn:applicable-vms="pre-launched">
        <xs:documentation>Enable passthrough of the Primary-to-Sideband (P2SB) bridge register access BAR to this VM.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="HiddenDevType">
  <xs:all>
    <xs:element name="HIDDEN_PDEV" type="VBDFType" minOccurs="0" maxOccurs="unbounded">
      <xs:annotation acrn:views="">
        <xs:documentation>Specify the hidden device vBDF</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="PCIDevsConfiguration">
  <xs:sequence>
    <xs:element name="pci_dev" type="xs:string" minOccurs="0" maxOccurs="unbounded">
      <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])">
        <xs:documentation>Select the PCI devices you want to assign to this virtual machine.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="USBDevsConfiguration">
  <xs:sequence>
    <xs:element name="usb_dev" type="xs:string" minOccurs="0" maxOccurs="unbounded">
      <xs:annotation acrn:title="USB device assignment"
                     acrn:options="//usb_device/@description" acrn:options-sorted-by="lambda s: s"
                     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.'">
        <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>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
</xs:complexType>


<xs:simpleType name="VirtioNetworkFrameworkType">
  <xs:annotation>
       <xs:documentation>A string with value: ``Kernel based (Virtual Host)`` or ``User space based (VBSU)``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="Kernel based (Virtual Host)" />
    <xs:enumeration value="User space based (VBSU)" />
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="VirtioNetworkConfiguration">
  <xs:sequence>
    <xs:element name="virtio_framework" type="VirtioNetworkFrameworkType" default="User space based (VBSU)" minOccurs="0">
      <xs:annotation acrn:title="Virtio framework">
        <xs:documentation>Specify the virtio framework for specific virtio network device implemented in the Service VM.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="interface_name" minOccurs="0">
      <xs:annotation acrn:title="Network interface name" acrn:widget-options="'placeholder': 'An arbitrary-long string with letters, digits, underscores or dashes.'">
        <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>
      </xs:annotation>
      <xs:simpleType>
        <xs:annotation>
          <xs:documentation>A string of letters, digits, ``_``, or ``-``.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
          <xs:pattern value="[a-zA-Z0-9_\-]+" />
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:simpleType name="VirtioConsoleUseType">
  <xs:annotation>
       <xs:documentation>A string with value: ``Virtio console`` or ``Virtio serial port``</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="Virtio console" >
      <xs:annotation acrn:title="virtio serial port (as console)" />
    </xs:enumeration>
    <xs:enumeration value="Virtio serial port" >
      <xs:annotation acrn:title="virtio serial port" />
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="VirtioConsoleBackendType">
  <xs:annotation>
       <xs:documentation>A string with value: ``pty``, ``stdio``, or ``file``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="pty" />
    <xs:enumeration value="stdio" />
    <xs:enumeration value="file" />
    <xs:enumeration value="sock client">
      <xs:annotation acrn:views="" />
    </xs:enumeration>
    <xs:enumeration value="sock server">
      <xs:annotation acrn:views="" />
    </xs:enumeration>
    <xs:enumeration value="tty" >
      <xs:annotation acrn:views="" />
    </xs:enumeration>
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="VirtioGPUDisplayType">
  <xs:annotation>
       <xs:documentation>A string with value: ``Window`` and ``Full screen``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="Window" />
    <xs:enumeration value="Full screen" />
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="WindowResolutionsType">
  <xs:annotation>
       <xs:documentation>Values of display window resolutions.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="1920x1080" />
    <xs:enumeration value="1680x1050" />
    <xs:enumeration value="1600x900" />
    <xs:enumeration value="1440x900" />
    <xs:enumeration value="1400x1050" />
    <xs:enumeration value="1366x768" />
    <xs:enumeration value="1360x768" />
    <xs:enumeration value="1280x1024" />
    <xs:enumeration value="1280x960" />
    <xs:enumeration value="1280x800" />
    <xs:enumeration value="1280x768" />
    <xs:enumeration value="1280x720" />
    <xs:enumeration value="1280x600" />
    <xs:enumeration value="1152x864" />
    <xs:enumeration value="1024x768" />
    <xs:enumeration value="800x600" />
  </xs:restriction>
</xs:simpleType>

<xs:complexType name="DisplayConfiguration">
  <xs:all>
    <xs:element name="monitor_id" type="xs:integer" minOccurs="0">
      <xs:annotation acrn:title="Monitor ID" acrn:options="//display/text()" acrn:options-sorted-by="int">
        <xs:documentation>Monitor id specifies which physical monitor the virtual display locates in full screen mode.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="window_resolutions" type="WindowResolutionsType" minOccurs="0">
      <xs:annotation acrn:title="Window resolutions">
        <xs:documentation>Windows resolution specifies the virtual window size of user vm.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="horizontal_offset" type="xs:integer" minOccurs="0">
      <xs:annotation acrn:title="Horizontal offset (pixels)">
        <xs:documentation>The abscissa (x-axis coordinate) of the left top point of the virtual window.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="vertical_offset" type="xs:integer" minOccurs="0">
      <xs:annotation acrn:title="Vertical offset (pixels)">
        <xs:documentation>The ordinate (x-axis coordinate) of the left top point of the virtual window.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="DisplaysConfiguration">
  <xs:sequence>
   <xs:element name="display" type="DisplayConfiguration" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="VirtioGPUConfiguration">
  <xs:all>
    <xs:element name="display_type" type="VirtioGPUDisplayType">
      <xs:annotation acrn:title="Display type">
        <xs:documentation>Display type provide virtual display for user vm with either full screen mode or virtual window mode.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="displays" type="DisplaysConfiguration"/>
  </xs:all>
</xs:complexType>

<xs:complexType name="VirtioConsoleConfiguration">
  <xs:all>
    <xs:element name="use_type" type="VirtioConsoleUseType" default="Virtio console">
      <xs:annotation acrn:title="Use type">
        <xs:documentation>Specify device type in guest, ether HVC console when user config it as virtio console or /dev/vportXpY
device file when user config it as virtio serial port, which can be read and written from the user space.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="backend_type" type="VirtioConsoleBackendType" default="stdio">
      <xs:annotation acrn:title="Backend type">
        <xs:documentation>Specify backend device type in service VM.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="output_file_path" type="xs:string" minOccurs="0">
      <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.'">
        <xs:documentation>The output file path for the file backend type.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="sock_file_path" type="xs:string" minOccurs="0">
      <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.'">
        <xs:documentation>The sock file path for the sock server or client backend type.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="tty_device_path" type="xs:string" minOccurs="0">
      <xs:annotation acrn:title="TTY device path" acrn:widget-options="'placeholder': '/dev/ttyX, needed only when backend type is tty.'">
        <xs:documentation>The device path for the tty backend type.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:all>
</xs:complexType>

<xs:complexType name="VirtioInputConfiguration">
  <xs:sequence>
    <xs:element name="backend_device_file" type="xs:string" minOccurs="0">
      <xs:annotation acrn:title="Backend device file" acrn:widget-options="'placeholder': '/dev/input/eventX'"
                     acrn:options="for $input in //inputs/input return concat('Device name: ', $input/name/text(), ', Device physical path: ', $input/phys/text())"
                     acrn:options-sorted-by="lambda s: s">
        <xs:documentation>Specifying backend device in service vm with device description.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="id" minOccurs="0">
      <xs:annotation acrn:title="Guest virtio input device unique identifier" acrn:widget-options="'placeholder': 'An arbitrary-long string with letters, digits, underscores or dashes.'">
        <xs:documentation>Specifying unique identifier to distinguish same devices in guest.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
         <xs:annotation>
              <xs:documentation>A string with letters, digits, ``_``, or ``-``.</xs:documentation>
         </xs:annotation>
        <xs:restriction base="xs:string">
          <xs:pattern value="[a-zA-Z0-9_\-]*" />
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
  </xs:sequence>
</xs:complexType>

<xs:simpleType name="vsockCIDType">
    <xs:annotation acrn:widget-options="'placeholder': 'integer greater than 2'" />
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="3" />
      <xs:maxInclusive value="4294967294" />
    </xs:restriction>
</xs:simpleType>

<xs:simpleType name="OSType">
  <xs:annotation>
    <xs:documentation>A string with either ``Non-Windows OS`` or  ``Windows OS``.</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:enumeration value="Non-Windows OS" />
    <xs:enumeration value="Windows OS" />
  </xs:restriction>
</xs:simpleType>

</xs:schema>
