]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: validate bochs-display capability
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 13 Sep 2019 21:20:27 +0000 (16:20 -0500)
committerCole Robinson <crobinso@redhat.com>
Wed, 9 Oct 2019 18:45:42 +0000 (14:45 -0400)
When the bochs display type was added, the capability was never checked.
Add that check in the same place as the other video device capability
checks.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
src/qemu/qemu_process.c

index ba1ccf992a55587406c0ba7c5cff958ff573a3df..9de86b3ce1e3c31bf18a881b20a3b60e8aaf3c05 100644 (file)
@@ -5271,7 +5271,9 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm,
                  !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU)) ||
                 (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
                  video->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
-                 !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW))) {
+                 !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW)) ||
+                (video->type == VIR_DOMAIN_VIDEO_TYPE_BOCHS &&
+                !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_BOCHS_DISPLAY))) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                _("this QEMU does not support '%s' video device"),
                                virDomainVideoTypeToString(video->type));