[Originally posted on 09/21/18 by Tonny Wong]
A few decades ago, the PC revolution brought about the mobile office. The evolution of the PC continues to amaze us with ever shrinking form factors that power ever complex applications. The time has come when thin and light will not power that graphics intensive application that we need to run with the performance that we’ve come to expect. Fortunately, one need not choose between performance and mobility as there already exists a solution that offers both and throws in manageability and security for free.
Virtual desktop infrastructures or VDI separates the heavily lifting of rendering an entire desktop and its applications with the relatively light task of displaying that desktop. This separation places the calculation intensive processing in the datacenter, allowing the desktop stream anywhere at any time. The problem of managing individual desktops across different locations simplifies the job of managing consolidated servers and the virtual desktops (virtual machines or VMs) running inside of them. The added benefit is that intellectual property created inside these virtual machines remain secure within the servers.
VDI needs GPUs, but GPUs make sense in datacenters only if they are scalable and the only way to scale a GPU is to virtualize it. AMD’s approach to the GPU virtualization resulted in the industry’s first hardware-based virtualization solution we now call MxGPU technology (short for Multi-User GPU). It is an elegant solution because of its simple implementation. Rather than creating another software layer to manage all the properties and attributes required to enable different users to share graphics resources, AMD designed a whole new class of GPUs and implemented these properties and attributes in silicon. Instead of devising proprietary methodologies in software, we utilized existing hardware standards to build MxGPU from the ground up.
At the core of the MxGPU architecture is a well-established and proven PCIE standard extension called SR-IOV (Single Root I/O Virtualization). This extension defines the specifications for a virtualizable PCIE device that can replicate itself on the PCIE bus. Rules governing what should be implemented in hardware are found in this extension which introduces the concept of the physical function or PF (the physical device) and virtual function or VF (virtual copies of the physical device). The remaining nuts and bolts of how the PF interacts with the VFs completes the MxGPU architecture and is an orchestrated effort between the hardware scheduler implemented in silicon, the host driver that interacts with the PCIE bus and the Radeon Pro driver that is loaded in the virtual machine.
The hardware scheduler is very predictable in its operation. With a very consistent cadence, it assigns the entire GPU’s resources to a particular VF at a particular time slice. Once the VF’s time slice has expired, the scheduler initiates a context save and the active VF relinquishes the GPU resources to the next VF in the queue. By implementing this “fair time slicing” model among the virtual functions, MxGPU asserts a high quality of service (QoS) for all the users sharing the same physical GPU.
It is not by accident that VFs will look and operate like mini physical GPUs once they are assigned to virtual machines. Each VF will carve out its own physical region of frame buffer or video memory. Each VF will appear with device IDs in the operating system’s device manager in its respective virtual machine. Apart from hardware enforced mechanisms implemented to a) restrict one VF’s access to another VF’s data and b) restrict the VF’s ability to change virtualization configuration parameters, the VFs are functionally identical to the parent PF. OpenGL®, DirectX® and even OpenCL® applications running on any AMD graphics cards can be directly ported to virtual machines with MxGPU enabled. To be exact, the same great Radeon Pro drivers developed for AMD’s professional class graphics cards can be used, unaltered, in a virtual environment with MxGPU.
The high QoS to all users sharing the same device, the hardware enforced data and access boundaries, the ability to use native professional graphics drivers and the simplicity of a hardware implementation through an industry standard, makes MxGPU an exceptionally suitable solution to deliver graphics in the datacenter.
Tonny Wong is the Cloud Graphics Product Manager at AMD. His postings are his own opinions and may not represent AMD’s positions, strategies or opinions. Links to third-party sites and references to third-party trademarks are provided for convenience and illustrative purposes only. Unless explicitly stated, AMD is not responsible for the contents of such links, and no third-party endorsement of AMD or any of its products is implied. Use of third-party names or marks is for informational purposes only and no endorsement of or by AMD is intended or implied.
DirectX is a registered trademark of Microsoft Corporation in the US and other jurisdictions. OpenCL is a trademark of Apple Inc. used by permission by Khronos. OpenGL is a registered trademark of Silicon Graphics, Inc. used by permission by Khronos.