[RFC v2 15/16] qemu: build vhost-user-gpu video device arguments

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Change the model name to "vhost-user-gpu-pci" if running on PCI.

Set the "max_outputs" property.

Associate the device with the "vhost-user" backend.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5d08ea7d50..78535fbd03 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4421,7 +4421,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
         goto error;
     }
 
-    if (STREQ(model, "virtio-gpu")) {
+    if (STREQ(model, "virtio-gpu") || STREQ(model, "vhost-user-gpu")) {
         if (video->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
             virBufferAsprintf(&buf, "%s-ccw", model);
         else
@@ -4469,6 +4469,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
             if (video->heads)
                 virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
         }
+    } else if (video->type == VIR_DOMAIN_VIDEO_TYPE_VHOST_USER) {
+        if (video->heads)
+            virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
+        virBufferAsprintf(&buf, ",vhost-user=vu-%s", video->info.alias);
     } else if (video->vram &&
         ((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA &&
           virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) ||
-- 
2.19.0.rc0.48.gb9dfa238d5

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




[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