Nvidia's Virtualization Unlocked On Gaming GPUs via Hack

Nvidia
(Image credit: Nvidia)

A group of enthusiasts has unlocked vGPU (GPU virtualization) capability, which is only supported on select datacenter and professional boards, on standard consumer Nvidia GeForce gaming graphics cards. Since the vGPU capability is supported by the silicon but locked out by software, it was only a matter of time and effort before enthusiasts unlocked the feature. As it turns out, according to a Reddit post, that time has come, potentially saving some users the thousands of dollars they would otherwise have to shell out for a Quadro or Tesla GPU that supports the feature.

GPU virtualization, which allows more than one user to use a GPU simultaneously, is one of the differentiators between GPUs for data centers and those designed for consumer PCs. Nowadays, many workstations and even high-end desktops are located remotely so the users can share the GPUs. Modern hardware is so powerful that its performance is sometimes excessive for one user, so sharing one graphics card between multiple users makes sense.

From a GPU hardware perspective, virtualization is just another feature, so the silicon supports it. But this capability requires a lot of software to work properly (i.e., how companies that buy workstations expect it to) and validation with ISVs since virtualized GPUs are in many cases used for professional applications.

All of these things cost money, so vGPU support comes at a price, and Nvidia has a handful of expensive Tesla, Quadro, and some other GPUs it recommends for virtualization (partly because it does not make a lot of sense to validate a broad fleet of hardware with ISVs). Nvidia's vGPU software does not support most client GPUs. Nvidia did recently open up GPU passthrough via a driver update, but this only allows a single VM to access the GPU, whereas full vGPU support allows multiple VMs to share the same GPU.

The code for the vGPU unlocker is available at Github, and the principle behind it is fairly simple: it replaces the device id of a graphics card with a device id of an officially supported GPU that has the same feature set. For now, GP102, GP104, TU102, TU104, and GA102 GPUs are supported, and the capability works on Linux and with KVM virtual machine software. 

(Image credit: WindowsHate/GitHub)

While the new unlocking technique deserves some attention, the big question is whether your typical consumer actually needs GPU virtualization. Linux users can virtualize their high-end graphics cards and use them for gaming, video encoding, and cryptocurrency mining simultaneously on different virtual machines. 

Some of those who happen to have servers with hundreds or thousands of consumer Nvidia GPUs could try to offer commercial remote desktop services to earn money, but the quality of such services would be something to worry about. Since the hack does not work with Windows and Vmware, it is useless for most users. 

Anton Shilov
Contributing Writer

Anton Shilov is a contributing writer at Tom’s Hardware. Over the past couple of decades, he has covered everything from CPUs and GPUs to supercomputers and from modern process technologies and latest fab tools to high-tech industry trends.

  • scostigan
    I thought NVidia did this on the last driver release.

    Game Ready Drivers provide the best possible gaming experience for all major new releases. Prior to a new title launching, our driver team is working up until the last minute to ensure every performance tweak and bug fix is included for the best gameplay on day-1.

    Game Ready for OutridersThis new Game Ready Driver provides support for the launch of Outriders, which features NVIDIA DLSS technology. Additionally, this release also provides optimal day-1 support for:
    DIRT 5’s new ray tracing update
    The launch of Evil Genius 2: World Domination
    The launch of the KINGDOM HEARTS Series on the Epic Games Store
    Gaming TechnologyIncludes support for Resizable BAR across the GeForce RTX 30 Series of Desktop and Notebook GPUs
    Includes beta support for virtualization on GeForce GPUs
    Reply
  • tripleX
    No, this is different. Nvidia opened up GPU pass through, which is not the same as vGPU. Currently, only one VM can use the GPU in passthrough mode. This mode (vGPU) makes it so that multiple VMs can share a single GPU.
    Reply
  • mac_angel
    There's also a hack that unlocks the limit NVidia puts on hardware parallel encoding and decoding.

    https://github.com/keylase/nvidia-patch/blob/master/win/README.md
    Reply
  • xpms
    Hi, I'm attempting to use this hack and I'm stucked on the last step where you have to build the Nvidia kernel.
    I installed the last VGPU driver for linux KVM and the commands shows the following error:

    sudo dkms install -m nvidia -v 525.105.14
    Kernel preparation unnecessary for this kernel. Skipping...


    Building module:
    cleaning build area...
    'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.15.0-76-generic modules....(bad exit status: 2)
    Error! Bad return status for module build on kernel: 5.15.0-76-generic (x86_64)
    Consult /var/lib/dkms/nvidia/525.105.14/build/make.log for more information.
    just in case someone has achieved this, I wonder if using an older driver would solve the problem...
    Reply