I’ve have been hitting my head against the wall trying to figure out why my GPU won’t hand off to a VM under Virt-manager. A little Background:
Linux Mint 18.3
Asrock x399 Fatal1ty
32 GB Corsair LPX
Host GPU: Gigabyte RX550
Guest GPU: Sapphire RX580 Pulse 8GB
I have followed many of the available tutorials and finally got my system to stub out my RX580 during early kernel module load. I can confirm that when the system boots and I run lspci -nnk that my RX580 and the associated audio device are in the same group and they are both using the VFIO-PCI drivers.
When I go to start a Windows 7 VM in Virt-manager, I receive no errors and the system graph appears to ramp up and stay around the 25% range. When I run an lspci on the host after starting the VM, it appears that the audio device is using the hda-intel audio driver and no longer listed as using the VFIO-PCI driver, However, the GPU is still listed as “kernel module in use = VFIO-PCI”. The separate monitor that I have plugged into the guest GPU never even flickers or shows any signs of life. Also the performance on my host system tanks pretty hard and the mouse sometimes becomes jittery and unresponsive. An attempt to shut down brings up error output referencing AMD-vi errors and will not completely shut down unless I physically press and hold the power button on my case.
Additionally, I did patch my kernel 4.15.7 (latest stable one at the time of writing) with the tr reset bug patch (I believe it’s the one @gnif released) to see if it helped, however, I’m still experiencing the issue the same as described above.