Skip to content

virglrenderer: introduce virgl_renderer_resource_map2

Sergio Lopez requested to merge slp/virglrenderer:resource_map2 into main

Introduce virgl_renderer_resource_map2, a variant of virgl_renderer_resource_map with different semantics, intended to be used by VMMs that run the virtio-gpu device in the same context/process as the VM, enabling them to delegate to virglrenderer the mapping of a BO into a host address that's linked to a guest address.

This function requires MAP_FIXED in flags and must be called with a valid address to be used in mmap(). The address is owned by the VMM and must be released by its own means.

Renderer contexts can optionally implement resource_map() to map OPAQUE_HANDLE blobs on behalf of the VMM. This is specially useful for native context implementations as allows them to honor BO sharing semantics.

Edited by Sergio Lopez

Merge request reports

Loading