[PATCH 5/5] qemuValidateDomainDeviceDefVideo: Reject non-default video head count for devices not supporting it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_validate.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 5b2af94890..4fb4a8a536 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) {
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux