diff mbox

[RESEND,2/2] qemu: command: Error on accel2d

Message ID c30c6628f94f4597111dc9bc26b8992a3c04919e.1466625043.git.crobinso@redhat.com
State Accepted
Commit 7490fdec922aca0f9e333d788a6ae5c9ff16b7e3
Headers show

Commit Message

Cole Robinson June 22, 2016, 7:53 p.m. UTC
qemu doesn't have any accel2d support wired up. Explicitly error
if a user tries it out, or typos the accel3d option
---
 src/qemu/qemu_command.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox

Patch

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f3c26f9..4fdb410 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4066,6 +4066,12 @@  qemuBuildDeviceVideoStr(const virDomainDef *def,
 
     virBufferAsprintf(&buf, "%s,id=%s", model, video->info.alias);
 
+    if (video->accel && video->accel->accel2d == VIR_TRISTATE_SWITCH_ON) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("qemu does not support the accel2d setting"));
+        goto error;
+    }
+
     if (video->accel && video->accel->accel3d == VIR_TRISTATE_SWITCH_ON) {
         if (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
             !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL)) {