From: Peter Krempa Date: Tue, 18 Jan 2022 15:59:35 +0000 (+0100) Subject: qemuValidateDomainDeviceDefVideo: Reject non-default video head count for devices... X-Git-Tag: v8.1.0-rc1~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1652babf15cea63323411c450c408848f96e5866;p=thirdparty%2Flibvirt.git qemuValidateDomainDeviceDefVideo: Reject non-default video head count for devices not supporting it 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 Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index b5783e84ad..ae0ee4e744 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -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) {