From 7c18e26044498986081deacd38d3bec9490615a4 Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Wed, 17 Aug 2022 14:30:02 +0800 Subject: [PATCH] config_tools: add assertions for virtio gpu 1. In the full screen mode, a VM supports 4 virtual displays at most. 2. A vm supports 2 virtual windows at most. 3. The monitor ID cannot be duplicated in the full screen mode. 4. All the display elements are in DisplayConfiguration of VMType.xsd. It cannot be set as required. Using assertions to check if the sub-elements are set for any type of virtual display accordingly. - check if a display has been added and a display type is set. - check if monitor ID is set for full screen virtual display. - check if resolution and offsets are set for window virtual display. Tracked-On: #7970 Signed-off-by: Kunhui-Li Signed-off-by: Yang,Yu-chu Reviewed-by: Junjie Mao --- .../schema/checks/virtio_devices.xsd | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/misc/config_tools/schema/checks/virtio_devices.xsd b/misc/config_tools/schema/checks/virtio_devices.xsd index b7eac7d45..60ccef0e6 100644 --- a/misc/config_tools/schema/checks/virtio_devices.xsd +++ b/misc/config_tools/schema/checks/virtio_devices.xsd @@ -14,4 +14,65 @@ + + + VM "{$vm/name}": monitor ID is required for "full screen" virtual display. + + + + + + VM "{$vm/name}": window resolution is required for "window" virtual display. + + + + + + VM "{$vm/name}": horizontal offset (pixels) is required for "window" virtual displays. + + + + + + VM "{$vm/name}" support 2 virtual windows at most. +Remove some of the virtual displays so that the total number does not exceed that limit. + + + + + + The monitor id "{$monitor_id}" has been assigned multiple times to VM "{$vm/name}". +Choose a different monitor id or remove some of the virtual displays which have the same monitor id. + + + + + + VM "{$vm/name}" support 4 virtual displays at most in the full screen mode. +Remove some of the virtual displays so that the total number does not exceed that limit. + + + + + + VM "{$vm/name}" support 2 virtual windows at most. +Remove some of the virtual displays so that the total number does not exceed that limit. + + +