Initial test guest userspace/ virglrenderer implementation of VIRTIO_GPU_F_RES_V2
@kraxel has untested branch with the kernel implementation:
https://git.kraxel.org/cgit/linux/log/?h=drm-virtio-ttm
It's customary for things to have guest userspace/host implementations before they land upstream, so we should look into this.
We should investigate if host drivers that don't support GL_MAP_COHERENT_BIT/GL_MAP_PERSISTENT_BIT (most GLES drivers) could benefit. We would have to unmap before draw calls, and re-map and re-inject the host memory after that. So here's what we need:
- additional virglrenderer callbacks (i.e, (
*set_guest_region(void *map adrress, uint32_t size, phys_addr_t addr)
) - QEMU implemenation/plumbing
- crosvm implementation/plumbing
- Guest + host protocol in the case the driver doesn't support GL_MAP_COHERENT_BIT/GL_MAP_PERSISTENT_BIT.
- Guest using the new ioctls + protocol when appropriate.
I'm taking a look at (3) at the moment, anyone looking at other items would be very much appreciated.