Weird broken VFIO quirks on ASRock Z690 Steel Legend board

Hello. I’ve got a leftover VFIO setup that I know worked fine on my previous hardware (as in I installed this operating system on a different machine and migrated the drive it was installed to between systems when I upgraded). Followed Arch Wiki’s OVMF passthrough guide to a T. Nope, didn’t work. Everything seems fine up until I try to actually start the VM. For newer NVIDIA graphics cards (pascal and newer) the guest machine has no idea what the hell it is because the device ID is completely wrong, spoofing it in the VM XML does not fix it, somehow the communication between the VM and the card is broken. For much older cards like my GTS 250 I have for retro games, the VM won’t even start, QEMU locks up for roughly 5 minutes before giving up and then putting the card in an unusable limbo state until host restart.

I fired up a Linux Mint install with an identical libvirt setup on the previous motherboard and CPU I was using before, and it worked so flawlessly it actually shocked me.

After digging for a while I’ve narrowed it down to something wrong with either this board’s southbridge or it’s firmware. I have everything VT-x/VT-d and IOMMU related turned on. Nothing of suspect in the BIOS settings but throw ideas my way anyway.

Neofetch output if you need my system specs:


Motherboard: Z690 Steel Legend
CPU: 12th Gen Intel i7-12700K (20) @ 4.9GHz [34.0°C]
GPU: NVIDIA GeForce GTX 1050
GPU: NVIDIA GeForce RTX 4070
GPU: Intel AlderLake-S GT1
Memory: 4.92GiB / 62.56GiB (7%)
Display: 1920x1080 @ 60.00Hz, 3440x1440 @ 144.00Hz

OS: EndeavourOS x86_64
Kernel: Linux 6.9.5-zen1-1-zen
Uptime: 15 mins
Shell: bash
DE: trinity R14.1.2
WM: twin

EDIT: So the “completely wrong” device ID is actually for Red Hat’s display driver. Which means the passthrough card is not being detected by the VM at all. In some really nasty cases the card will just hot-remove itself and completely disappear from the host machine entirely. I’ve tried every BIOS setting related to Resizable BAR, above 4G transfers, etc. nothing worked.