Skip to content

drm/virtio: implement guest vram

Andrii Pauk requested to merge apauk/drm-misc-next:guest_vram into virtio-gpu-next

Add support of GUEST_VRAM type of blob. These are dedicated heap memory allocations required for vk support on hypervisors that don't support runtime injections of host memory into guest physical address space.

The flow of usage:

  1. Host VM reserves dedicated heap memory in it's dts
  2. Device get info about memory reservations and report it to guest using new mmio registers
  3. Guest virtio-gpu driver on starts checks new mmio registers for physical address and length of reserved region. Then it reserves it in guest.
  4. On create_blob drm ioctl guest driver gets chunk of required memory and send it to host using sg list. It uses one sg entry for 1 blob call. Heap is managed on guest using drm memory manager (drm_mm).

Mesa changes mesa/mesa!14536 (merged)

Virglrenderer changes virglrenderer!678 (merged)

/cc @gurchetansingh @olv

Edited by Andrii Pauk

Merge request reports

Loading