Date
1 - 2 of 2
[PATCH v3 5/5] config_tools: add assertions for virtio gpu
Yang, Yu-chu
From: Kunhui-Li <kunhuix.li@...>
1. In the full screen mode, a VM supports 4 virtual displays at most. 2. A vm supports 2 virtual windows at most. 3. Monitor ID cannot be duplicated. v2->v3 1. monitor ID cannot be duplicated. Tracked-On: #7970 Signed-off-by: Kunhui-Li <kunhuix.li@...> Signed-off-by: Yang,Yu-chu <yu-chu.yang@...> --- .../schema/checks/virtio_devices.xsd | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/misc/config_tools/schema/checks/virtio_devices.xsd b/misc/config_tools/schema/checks/virtio_devices.xsd index b7eac7d45..cbdd81978 100644 --- a/misc/config_tools/schema/checks/virtio_devices.xsd +++ b/misc/config_tools/schema/checks/virtio_devices.xsd @@ -14,4 +14,27 @@ </xs:annotation> </xs:assert> + <xs:assert test="every $vm in /acrn-config/vm satisfies + count($vm/virtio_devices/gpu[display_type = 'Full screen']/displays/display) <= 4 + "> + <xs:annotation acrn:severity="error" acrn:report-on="$vm"> + <xs:documentation>VM "{$vm/name}" support 4 virtual displays at most in the full screen mode.</xs:documentation> + </xs:annotation> + </xs:assert> + + <xs:assert test="every $vm in /acrn-config/vm satisfies + count($vm/virtio_devices/gpu[display_type = 'Window']/displays/display) <= 2 + "> + <xs:annotation acrn:severity="error" acrn:report-on="$vm"> + <xs:documentation>VM "{$vm/name}" support 2 virtual windows at most.</xs:documentation> + </xs:annotation> + </xs:assert> + + <xs:assert test="every $monitor_id in /acrn-config//monitor_id satisfies + count(/acrn-config//monitor_id[./text()=$monitor_id]) = 1"> + <xs:annotation acrn:severity="error" acrn:report-on="//vm[./virtio_devices/gpu/displays/display/monitor_id/text()=$monitor_id]"> + <xs:documentation>The monitor_id '{$monitor_id}' has been assigned multiple times to VM(s) '{//vm[./virtio_devices/gpu/displays/display/monitor_id/text()=$monitor_id]/name}' </xs:documentation> + </xs:annotation> + </xs:assert> + </xs:schema> -- 2.25.1 |
|
Junjie Mao
toggle quoted message
Show quoted text
-----Original Message-----This assertion only applies when the display_type is "Full screen". The `monitor_id` nodes may still be there in the configurator-generated XML when a user chooses "Full screen", specifies the monitor IDs and switches back to "Window" again. --- Best Regards Junjie Mao + <xs:annotation acrn:severity="error" acrn:report- |
|