1<?xml version="1.0"?>
2<!-- Copyright (C) 2022 Intel Corporation. -->
3<!-- SPDX-License-Identifier: BSD-3-Clause -->
4
5<xs:schema xml:id="root"
6           xmlns:xs="http://www.w3.org/2001/XMLSchema"
7           xmlns:acrn="https://projectacrn.org">
8
9  <xs:assert test="every $VM_NAME in /acrn-config//IVSHMEM//VM_NAME satisfies
10                  every $REGION_NAME in /acrn-config//IVSHMEM_REGION[IVSHMEM_VMS/IVSHMEM_VM/VM_NAME=$VM_NAME]/NAME satisfies
11                  count(/acrn-config//IVSHMEM_REGION[NAME=$REGION_NAME]/IVSHMEM_VMS/IVSHMEM_VM[VM_NAME=$VM_NAME]) = 1">
12    <xs:annotation acrn:severity="error" acrn:report-on="$REGION_NAME">
13        <xs:documentation>VM "{$VM_NAME}" may not be duplicated in the list of VMs that have access to the Inter-VM shared memory region "{$REGION_NAME}".</xs:documentation>
14    </xs:annotation>
15  </xs:assert>
16
17  <xs:assert test="every $NAME in /acrn-config//IVSHMEM_REGION//NAME satisfies
18                  not(/acrn-config//IVSHMEM_REGION//NAME = '')">
19    <xs:annotation acrn:severity="error" acrn:report-on="$NAME">
20      <xs:documentation>InterVM shared memory region name must be set </xs:documentation>
21    </xs:annotation>
22  </xs:assert>
23
24</xs:schema>
25