Oh hello I'm not alone. I've got Asrock TRX40 creator, 3970x, 2 x nvida 2070 super's and have been chasing this for weeks or months (lost track) on win10/11 vm.
Unraid works fine when the vm has crashed. But if i try and start it again i get
Execution error internal error: Unknown PCI header type '127' for device '0000:4e:00.0'
Only way to get it running again is reboot unraid. As @dcoulson says always happens when under higher loads playing games.
I'm thinking it's nvida driver changes (on latest currently 531.18) as vm has been stable for month's before this issue.
I've recreate VM, tried unsafe interrupts, update nvida drivers, windows is up to date...
I was thinking of maybe trying asrock bios beta 1.83 2022/5/30 AMD CastlePeakPI-SP3r3-1.0.0.7 currently on last stable one 1.70 2020/6/30 AMD CastlePeakPI-SP3r3-1.0.0.4 but not sure i want open that can of worms at the moment.🙃
I can't remember but thinking it started maybe around nvida Driver Version: 527.37 not tried using earlier version yet not had time!
Mar 6 16:14:29 kernel: vfio-pci 0000:4e:00.0: vfio_bar_restore: reset recovery - restoring BARs
Mar 6 16:14:32 kernel: vfio-pci 0000:4e:00.0: vfio_bar_restore: reset recovery - restoring BARs
Mar 6 16:14:32 kernel: vfio-pci 0000:4e:00.0: vfio_bar_restore: reset recovery - restoring BARs
Mar 6 16:14:32 kernel: vfio-pci 0000:4e:00.0: Unable to change power state from D0 to D3hot, device inaccessible
Mar 6 16:14:32 kernel: vfio-pci 0000:4e:00.0: vfio_bar_restore: reset recovery - restoring BARs