gnif/vendor-reset logo

gnif/vendor-reset

Free

Linux kernel vendor specific hardware reset module for sequences that are too complex/complicated to land in pci_quirks.c

FreeFree tier
Type
Open Source

About gnif/vendor-reset

vendor-reset is an open-source Linux kernel module that provides vendor-specific hardware reset routines for devices that require complex reset sequences too intricate for standard PCI quirks (pci_quirks.c). Developed primarily for AMD GPUs (Polaris, Vega, Navi series), it enables reliable re-initialization and VFIO passthrough to virtual machines without requiring kernel patches. Instead, it uses ftrace to hook pci_dev_specific_reset, allowing dynamic activation via modprobe. The module supports installation through DKMS or traditional make/make install, but must be loaded early in boot to prevent the default kernel reset from damaging supported hardware. Licensed under GPL-2.0, it is maintained on GitHub and accepts contributions from vendors and the community.

Key Features

No kernel patching required — uses ftrace to hook pci_dev_specific_reset
Supports AMD GPUs: Polaris 10/11/12, Vega 10/20, Navi 10/12/14, Rembrandt (680M), Instinct MI100
Installable via DKMS or standard make/make install pattern
Designed for VFIO passthrough in virtual machines
Loads dynamically via modprobe without modifying the running kernel
Easy for vendors to contribute new device support via pull requests
Early loading requirement ensures the default kernel reset doesn't break the GPU

Pros & Cons

Pros
  • No need to patch the kernel for GPU reset support
  • Supports a wide range of AMD GPUs (Polaris, Vega, Navi, etc.)
  • Simple installation via modprobe or DKMS
  • Vendor-friendly architecture encourages upstream contributions
  • Open source (GPL-2.0) with active community on GitHub
Cons
  • Currently supports only AMD GPUs (no Nvidia or Intel)
  • Must be loaded early in boot to avoid hardware damage from default kernel reset
  • Out-of-tree kernel module — not part of mainline Linux kernel
  • Complex reset sequences may be fragile and hardware-specific
  • Requires specific kernel configuration options enabled (FTRACE, KPROBES, etc.)

Best For

Resetting AMD GPUs for VFIO passthrough to virtual machinesRecovering hardware devices that require complex reset sequencesEnabling GPU passthrough on Linux without kernel patchingTesting and experimenting with vendor-specific reset routines

FAQ

Which GPU devices are supported?
Supported devices include AMD Polaris 10 (RX 470/480/570/580/590), Polaris 11 (RX 460/560), Polaris 12 (RX 540/550), Vega 10 (Vega 56/64/FE), Vega 20 (Radeon VII, Instinct MI100), Navi 10 (5600XT, 5700, 5700XT), Navi 10 Rembrandt (680M), Navi 12 (Pro 5600M), and Navi 14 (Pro 5300, RX 5300, 5500XT).
Do I need to patch my kernel to use vendor-reset?
No. The module uses ftrace to hook pci_dev_specific_reset, so no kernel patching is required. Simply load the module with modprobe.
Why does the module need to be loaded early?
The default kernel reset attempt can completely break the GPU, and vendor-reset cannot recover from that state. Loading the module early (e.g., via /etc/modules and updating initrd) ensures it handles the reset before the kernel applies a destructive default.
How do I install vendor-reset?
You can install it using the standard make && make install pattern, or via DKMS (recommended). Run 'dkms install .' from the module source directory. After installation, load with 'modprobe vendor-reset' or add it to /etc/modules for automatic loading.
Can I contribute support for my own GPU?
Yes. The project is open to contributions. However, the developers recommend first checking if the device can be reset via FLR or bus reset, or if a simple kernel PCI quirk would suffice. Only complex reset sequences belong here.