AMD MxGPU Virtualization For The AMDGPU Driver

Written by Michael Larabel in AMD on 18 December 2016 at 07:38 AM EST. 19 Comments
AMD --
Well this weekend is exciting for AMDGPU users and open-source AMD fans. Yesterday was the news we published about Valve looking to improve AMDGPU/RADV for their Vulkan-based VR experience while the latest is work from AMD that implements GPU virtualization support within the AMDGPU driver.

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.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week