Need help with AMD GPU passthrough to Windows guest

So I have done all the steps in the available guides, and everything seems to be OK, except in the Windows 7 guest after installing the latest drivers, the device has a yellow exclamation mark in Device Manager and reports Error 12 (not enough resources).

I should mention that my host is running Debian 9, updates installed, with 8GB RAM and using Intel iGPU. My guest is Windows 7 64bit with 4GB allocated. My passed-through GPU is Polaris 10 with 8GB VRAM.

Do you think having less RAM in the guest than the GPU has VRAM could be a problem? I’d hate to buy more memory and find out the problem is elsewhere.

Since I had no other option, I went ahead and bought some more RAM.
Unfortunately the problem is still there even with 10GB allocated to the VM.

Does anyone have any ideas what I could do at this point? Anyone encountered the Error12 with the AMD drivers in a VM (or even on bare metal)?

Have you tried this?

https://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/this-device-graphic-adapter-cannot-find-enough/bf6023aa-f4e0-4080-be8a-45093289eb80

This error can occur if two devices that are installed on your computer have been assigned the same I/O ports, the same interrupt, or the same Direct Memory Access channel (either by the BIOS, the operating system, or both). This error message can also appear if the BIOS did not allocate enough resources to the device.

The above seems to be your problem. Is your AMD GPU in it’s own IOMMU group?

Here are my IOMMU groups:

/sys/kernel/iommu_groups/7/devices/0000:00:1c.0
/sys/kernel/iommu_groups/5/devices/0000:00:19.0
/sys/kernel/iommu_groups/3/devices/0000:00:14.0
/sys/kernel/iommu_groups/11/devices/0000:03:04.0
/sys/kernel/iommu_groups/11/devices/0000:02:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/8/devices/0000:00:1d.0
/sys/kernel/iommu_groups/6/devices/0000:00:1a.0
/sys/kernel/iommu_groups/4/devices/0000:00:16.3
/sys/kernel/iommu_groups/4/devices/0000:00:16.0
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/10/devices/0000:00:1f.3
/sys/kernel/iommu_groups/10/devices/0000:00:1f.2
/sys/kernel/iommu_groups/10/devices/0000:00:1f.0
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/9/devices/0000:00:1e.0

My GPU is in Group 1. Here are all the devices in that group:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480] (rev cf)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aaf0
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)

I have passed-through the GPU itself and its integrated audio device. The other one I have not because some guides said you shouldn’t.