Re: [PATCH] drm/virtio: Add window server support

From: Tomeu Vizoso
Date: Fri Jan 12 2018 - 02:59:48 EST


On 01/12/2018 05:11 AM, Dave Airlie wrote:

this work is based on the virtio_wl driver in the ChromeOS kernel by
Zach Reizner, currently at:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/virtio/virtio_wl.c

There's two features missing in this patch when compared with virtio_wl:

* Allow the guest access directly host memory, without having to resort
to TRANSFER_TO_HOST

* Pass FDs from host to guest (Wayland specifies that the compositor
shares keyboard data with the guest via a shared buffer)

I plan to work on this next, but I would like to get some comments on
the general approach so I can better choose which patch to follow.

Shouldn't qemu expose some kind of capability to enable this so we know to
look for the extra vqs?

Sounds good. I'm unsure though on whether it should be done unconditionally if the hypervisor's code supports this, or if only if the user pass the -proxy-wayland switch and the hypervisor was able to open the socket to the compositor. I'm leaning towards the latter.

What happens if you run this on plain qemu, does it fallback correctly?

Will work on this.

Are there any scenarios where we don't want to expose this API because there
is nothing to back it.

I'm not sure what the overhead of the extra queues is, but I guess the ioctls could immediately return -ENODEV if the hypervisor doesn't have that capability.

Happy to see that there aren't any major concerns with the general approach.

Thanks,

Tomeu