]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuValidateDomainDeviceDefVideo: Reject non-default video head count for devices...
authorPeter Krempa <pkrempa@redhat.com>
Tue, 18 Jan 2022 15:59:35 +0000 (16:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 19 Jan 2022 15:54:33 +0000 (16:54 +0100)
Only QXL and virtio-vga actually propagate the 'heads' attribute as
'max_outputs' to the commandline of qemu. Reject the setting when
non-default value is used for any other video type.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2036300
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_validate.c

index b5783e84ada7a715549b2aa25fb01afc285be38f..ae0ee4e7448a128562c9c303b6f708acc9630f6e 100644 (file)
@@ -2480,6 +2480,13 @@ qemuValidateDomainDeviceDefVideo(const virDomainVideoDef *video,
                            virDomainVideoTypeToString(video->type));
             return -1;
         }
+
+        if (video->heads != 1) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                           _("video type '%s' doesn't support multiple 'heads'"),
+                           virDomainVideoTypeToString(video->type));
+            return -1;
+        }
     }
 
     if (video->accel && video->accel->accel2d == VIR_TRISTATE_SWITCH_ON) {