Getting Experimental Vulkan Within QEMU VMs Using Linux 5.16+ Paired With Mesa's Venus

Getting experimental Vulkan API support working within guest virtual machines on QEMU currently requires a number of steps, including the use of yet-to-be-upstreamed code in some areas.
On the kernel side Linux 5.16+ is needed that is still in development. That very latest kernel code is required for VirtIO context types support. Additionally, the kernel must be built with UDMABUF enabled. Mesa 21.1+ is needed but obviously the newer the Mesa code is generally the better experience from performance to new features.
Vulkan in guest VMs also requires a currently branched version of Virglrenderer along with a branched version of QEMU. Hopefully those Virgl and QEMU side changes will be upstreamed soon.
Those wanting to play around with Vulkan in QEMU VMs this weekend using the experimental code can see the build steps via this blog post by Collabora who has been involved with the open-source GPU guest VM support effort.
15 Comments