Hi,
I have recently been trying to do AMD VEGA GPU passthrough with a Linux Host and KVM/Virt-Manager/QEMU.
The VM was always crashing.
I narrowed down the problem to the passthrough of the GPU. If I passed through other devices, it was fine.
I have finally managed to solve it.
I appears that QEMU does not yet support PCI BAR resizing. The amdgpu driver in the guest tries to resize the bar from 256M to 8G and then tries to use it and you get a protection fault/crash.
There is now a work around that works, that has reached qemu git master. Eventually it will be in qemu releases.
So, no crashes any more.
Tested with Linux kernel 5.1.11 on the host.
The QEMU change that fixes the problem is:
https://github.com/qemu/qemu/commit/3412d8ec9810b819f8b79e8e0c6b87217c876e32Description: vfio/pci: Hide Resizable BAR capability
What this does is hide the resizable capability of the BAR, so amdgpu driver does not try to re-size it.
Also tested with a Windows guest.
3D Games in the guest work fine and are very fast.
The system is very stable.