Message ID | 58e9b4aefdd87f77f681955746ff93e62bb98c5c.1566576129.git.crobinso@redhat.com |
---|---|
State | Accepted |
Commit | 6396a478f4ea175eb71621a09353957e4629eb2c |
Headers | show |
Series | Add vhost-user-gpu support | expand |
On Fri, Aug 23, 2019 at 12:21:50PM -0400, Cole Robinson wrote: >From: Marc-André Lureau <marcandre.lureau@redhat.com> > >To support virtio VGA with vhost-user, vhost-user-vga device is necessary. > >Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> >Signed-off-by: Cole Robinson <crobinso@redhat.com> >--- > src/qemu/qemu_domain.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d0722f8761..bf0531126d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -12386,9 +12386,14 @@ bool qemuDomainSupportsVideoVga(virDomainVideoDefPtr video, virQEMUCapsPtr qemuCaps) { - if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_VGA)) - return false; + if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO) { + if (video->vhostuser) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_VGA)) + return false; + } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_VGA)) { + return false; + } + } return true; }