NVIDIA has been working on their own vGPU support for their binary driver, Intel's GVT is coming together in mainline, and now AMD has joined the party with publishing some patches for their DRM driver.
The patches by AMD's Xiangliang Yu work to implement CSA and KIQ along with mailbox communication with the GPU hypervisor. CSA is the Context Save Area. KIQ in this context is the Kernel Interface Queue, as described in one of the patches, "KIQ is queue-memory based initialization method: setup KIQ queue firstly, then send command to KIQ to setup other queues, without accessing registers. For virtualization, need KIQ to access virtual function registers when running on guest mode."
This AMD GPU virtualization support is initially implemented for Tonga and Fiji hardware. This AMD virtualization code is for implementing their virtualization support they advertise under the MxGPU branding. AMD announced their first hardware-virtualized GPU products at the beginning of 2016 while finally we are seeing this MxGPU support come for AMDGPU, but too late for Linux 4.10. Their MxGPU virtualization is described in more detail via this press release.
The code is initially going to be disabled at compile-time via hiding behind the DRM_AMD_MXGPU Kconfig switch. The DRM_AMD_MXGPU description, "This adds AMD GPU virtualization driver and wires it up into the amdgpu drivers. User can load the driver in guest OS and run graphics applications on AMD hardware in guest mode." The 23 patches add over two thousand lines of code to the kernel and can be found for now via amd-gfx.