Issues with GPU passthrough of Radeon R9 390

I have been using my Radeon R9 390 for GPU passthrough to a windows guest OS a couple of years now with an old version of windows 10 (2017 version), and old GPU driver. Host is running arch linux. Running this on a ryzen desktop (ryzen 7 1700) with x370 chipset. Everything worked as I wanted with looking glass and audio set up, except that I wasn’t able to upgrade windows (prevented me from running some games). So I tried reinstalling windows with the latest ISO. Now I’m having black screen issues when the GPU driver is automatically installed after windows installation. I can see windows booting, then black screen.

I had the same issue before when I tried upgrading the GPU driver on my previous windows install. I had to roll back to the previously installed driver. However I’ve not been able to get into safe mode with my new windows install to install an older driver.

Has anyone with a similar GPU (e.g. 290/290x/390/390x) been able to use the latest radeon drivers on a windows guest? Could this be a config issue, driver issue, or is my GPU dying?

I’m not using libvirt anymore, but rather qemu commandline directly. I’ve set the kvm.ignore_msrs kernel parameter, and the GPU devices (gpu and hdmi audio) is set up with vfio and passed through to the vm.

Here is my command line (hidden some details like mac address):

qemu-system-x86_64 \
	-name win10,process=win10 \
	-machine type=q35,accel=kvm \
	-cpu host,hv_time,kvm=off,hv_vendor_id=null \
	-smp 12,sockets=1,cores=12,threads=1 \
	-m 8G \
	-rtc clock=host,base=localtime \
	-vga none \
	-nographic \
	-serial none \
	-parallel none \
	-device vfio-pci,host=0b:00.0,multifunction=on \
	-device vfio-pci,host=0b:00.1 \
	-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/x64/OVMF_CODE.fd \
	-drive if=pflash,format=raw,file=/var/lib/libvirt/qemu/nvram/win10_VARS.fd \
	-boot order=dc \
	-drive id=disk0,if=virtio,cache=none,format=raw,aio=native,file=/dev/sdb \
	-drive id=disk1,if=virtio,cache=none,format=raw,aio=native,file=/dev/sdc \
	-netdev bridge,id=net0,br=br0 \
	-device e1000,netdev=net0,id=nic0,mac=xx:xx:xx:xx:xx:xx \
	-object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Func_Func_MS-3_Gaming_Mouse-event-kbd \
	-object input-linux,id=mouse2,evdev=/dev/input/by-id/usb-Func_Func_MS-3_Gaming_Mouse-if01-event-mouse \
	-object input-linux,id=keyboard1,evdev=/dev/input/by-id/usb-LITE-ON_Technology_USB_NetVista_Full_Width_Keyboard.-event-kbd,grab_all=on,repeat=on \
	-device ivshmem-plain,memdev=ivshmem_looking_glass \
	-object memory-backend-file,id=ivshmem_looking_glass,share=on,mem-path=/dev/shm/looking-glass,size=32M \
	-device ivshmem-plain,memdev=ivshmem_scream \
	-object memory-backend-file,id=ivshmem_scream,share=on,mem-path=/dev/shm/scream-ivshmem,size=2M \
	-usb \
	-device usb-host,vendorid=0x1c6b,productid=0xa223

Edit: dmesg gave me these kvm errors:

[32287.462435] kvm_msr_ignored_check: 14 callbacks suppressed
[32287.462437] kvm [13744]: ignored rdmsr: 0xc0011023 data 0x0
[32287.462441] kvm [13744]: ignored wrmsr: 0xc0011023 data 0x100
[32287.473975] kvm [13744]: ignored rdmsr: 0xc0011023 data 0x0
[32287.473984] kvm [13744]: ignored wrmsr: 0xc0011023 data 0x100
[32287.475029] kvm [13744]: ignored rdmsr: 0xc0011023 data 0x0
[32287.475036] kvm [13744]: ignored wrmsr: 0xc0011023 data 0x100
[32287.476143] kvm [13744]: ignored rdmsr: 0xc0011023 data 0x0
[32287.476153] kvm [13744]: ignored wrmsr: 0xc0011023 data 0x100
[32287.477164] kvm [13744]: ignored rdmsr: 0xc0011023 data 0x0
[32287.477171] kvm [13744]: ignored wrmsr: 0xc0011023 data 0x100

Edit 2: I solved my issue by swapping the GPUs. Now instead I use my R9 390 for the host and my R9 Nano for the windows guest.

At first my R9 Nano would not boot. After some googling I found that I had to upgrade the firmware of my R9 Nano to support UEFI (source). Then I was able to boot and install the drivers.

However I got error 43 after installing the drivers, which I found weird since I thought that was an NVIDIA issue. But after some googling I found a solution on reddit, to add a pcie root port.

Now the latest GPU driver loads fine, though not with the same GPU I started out with. Maybe the pcie root port could work for my 390 as well, but I’m not bothering switching back my GPUs to try that.

I am on AMD 20.91 gpu driver which is reflected as the latest and no issues. I have similar setup 1700X/390 passthrough with same kvm.ignore_msrs=1 flag.

I never had an issue with upgrading the GPU drivers on the guest before. Why was windows not able to be updated? Just curious whether both issues are related.

I doubt it would be a VM config issue if all that was done was a windows reinstall. Can you boot into the windows installation bare metal? Or possibly remove the blacklist and try the GPU on the host.

Is there any way to swap the pass-through GPU with the one the host is using?

Thanks for the feedback. The issue I had updating windows was a boot loop where the update was rolled back and then updated again, due to some issue with the virtio driver.

I actually booted with my 390 for the host now. The GPU seems to be fine. I tried switching the GPUs (my second GPU is an R9 Nano) but my vm doesn’t seem to post in that case.

I just tried swapping my GPUs. I’ve now setup my R9 390 for my host and vfio for my R9 Nano. However now my vm doesn’t post (before I got to the UEFI boot).

Edit: I made progress with passing through my R9 nano. I had to flash an updated firmware for the r9 nano for uefi support in order to use it for ovmf passthrough. Windows boot seems to crash now, but I’ll try to reinstall windows again.

1 Like

Glad to hear you resolved the issue. This was good knowledge as I wasn’t aware of error 43 with AMD gpu.

2 Likes