Skip to content
A Python script to patch NVIDIA vBIOS dumps into a format compatible with VFIO passthrough
Branch: master
Clone or download
Matoking Merge pull request #9 from RavenX8/maxwel
Support for GPUs older than pascal
Latest commit d269523 Feb 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add note about acquiring a vBIOS ROM Aug 1, 2017
LICENSE Initial commit Aug 1, 2017 Add a header note about GPU compatibility Jun 8, 2018 Update Sep 26, 2018


This tool is known to be compatible only with the Pascal series (1xxx) of NVIDIA GPUs. is a script that creates a patched/spliced copy of a NVIDIA vBIOS that allows PCI passthrough when using libvirt. This copy of the vBIOS can then be passed to libvirt, allowing the NVIDIA GPU to be used in the guest VM. This can be done by adding the following line to the VM domain XML file.

     <rom file='/path/to/your/patched/gpu/bios.bin'/>

This script may be useful if you are using one of the Pascal (1xxx series) series of NVIDIA GPUs and you are having passing the GPU to the guest VM. In this case, the vBIOS of the system's primary GPU is tainted when booting the host OS, making GPU passthrough impossible unless a clean copy of the vBIOS is used.

The patching process requires a full copy of the clean vBIOS. You can either extract it from the graphics card using nvflash or GPU-Z under Windows (recommended), or download one for your specific GPU model from TechPowerUp.


Use this script at your own discretion. This script has NOT been tested extensively, and has only been tested with a few GPUs belonging to he Pascal series of NVIDIA GPUs.

The script performs only a few rudimentary sanity checks, but no guarantees are made of the validity of the patched ROM!


The script should work with both Python 2 and 3.

To create a patched version of the BIOS, run the script with the following parameters.


A patched version of <ORIGINAL_ROM> will be written to <PATCHED_ROM>.

You can’t perform that action at this time.