AMD Radeon GPU Passthrough - Infamous reset bug

Patryk122PL

Member
Nov 22, 2023
2
0
6
Hello,

I'm not going to repeat what other users said / recommended - there are plenty of tutorials that more or less can get your AMD gpu working for VM passthrough.
My problem lays with very old and still preset in 9000 radeon gpu series issue (9070 xt specifically) - reset bug.

The best resources about this I found so far are those 2 github pages:
1. RX 9070 XT (RDNA4) passthrough on Proxmox — self-healing hookscript setup
2. Single-GPU Passthrough: AMD RX 9070 XT (Navi 48 / RDNA 4) on CachyOS

Ok, so i got 9070 xt working.. I'm using a slightly tweaked hook scripts from hughesyadaddy .. I can reliably pass gpu to vm and back to proxmox if.. (and that is a very big IF):

1. The hookscript unbinds GPU in pre-stop stage - so before VM process exits
2. I'm NOT using shutdown or restart procedures from within Windows VM itself.

From what I observed as soon as vfio-pci resets my gpu and this is automatic step after VM exit - my card becomes unstable and trying to bind it to amdgpu driver is successful only randomly. I posted more details here: Discussion question - more problems... #1

I would like to somehow block this automatic PCI reset procedure in proxmox or more specifically in QEMU.

Is there a way to disable or better yet exclude certain devices so that vfio-pci doesn't reset it on VM start and stop?
 
Best way would probably either be:
1.) AMD fixing the reset mechanism. Which they probably won't due to this being a Consumer GPU.
2.) Someone adding a PCI subsystem quirk for the card (Linux kernel code), as a workaround attempt.