qemu: build vhost-user GPU devices

For each vhost-user GPUs,
- build a socket chardev, and pass the vhost-user socket to it
- build a vhost-user video device and associate it with the chardev

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Marc-André Lureau
2019-09-23 14:44:42 +04:00
committed by Cole Robinson
parent dc7de8b963
commit e2b709f92e
2 changed files with 52 additions and 8 deletions

View File

@@ -49,7 +49,9 @@ ats=on \
ats=on \
-device virtio-input-host-pci,id=input3,evdev=/dev/input/event1234,bus=pci.0,\
addr=0x12,iommu_platform=on,ats=on \
-device virtio-gpu-pci,id=video0,bus=pci.0,addr=0x2,iommu_platform=on,ats=on \
-chardev socket,id=chr-vu-video0,fd=0 \
-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,\
bus=pci.0,addr=0x2,iommu_platform=on,ats=on \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xc,iommu_platform=on,\
ats=on \
-object rng-random,id=objrng0,filename=/dev/random \