My setup.
Unraid 6.11.5
AMD 3700x / GTX1650
ASUS TUF B550M PLUS / BIOS:3404 / AGESA ComboV2PI 1.2.0.B
Requirements.
1. Dumped vbios rom with GPUZ and removed nvflash header with hexeditor.
I had to dump mine even though techpowerup had exact model but i have 2 years newer revision.
Guide for making that dump: https://www.youtube.com/watch?v=1IP-h9IKof0
2. Having your GPU in own IOMMU group
Info about that: https://www.youtube.com/watch?v=qQiMMeVNw-o
My example at Tools>System Devices
IOMMU group 18: [1022:43ea] 03:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea
[10de:1d01] 04:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
[10de:0fb8] 04:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)
3. UEFI / BIOS Settings:
Have virtualizion enabled in bios and other setting to help separating IOMMU groups.
My example.
Tweaker -> Advanced CPU Settings -> SVM Mode -> Enable
Settings -> Miscellaneous -> IOMMU -> Enable
Settings -> AMD CBS -> ACS Enable -> Enable
Settings -> AMD CBS -> Enable AER Cap -> Enable
There is also SR-IOV setting somewhere.
There is also PCIe ACS override setting in unraid to help separate IOMMU groups.
Setting>VM Manager and select advanced view.
Installation
Create VM:
Add VM>Windows 10
CPU Mode: Host Passtrough
Machine: Q35-7.x
BIOS: OVMF
Select OS install ISO.
Download and select latest Virtio ISO.
Select suitable disk size. 50G on mine.
Select your graphics card and graphics card audio.
Create.
Select language preferences next and install.
I don't have product key (set it after install)
Select your windows version. (My case 10 Pro)
Accept terms.
Custom: Install Windows only (advanced)
Load driver>Browse>virtio-win-0.1.xxx>amd64>w10
Red Hat VirtIO SCSI controller>Next
Load driver>Browse>virtio-win-0.1.xxx>NetKVM>w10>amd64
Red Hat VirtIO Ethernet Adapter>Next
(You can add network later after installation also)
Select drive and next.
Set your personal account and privacy settings
You should be at your windows 10 desktop now.
Open start menu and type compmgmt.msc and open.
Open Device Manager.
On my case there are 2 devices without drivers.
Right click on driverless device and select update driver>Browse my computer>select whole virtio disk.
Thats all.
Twiikker
TROUBLESHOOTING:
qemu-system-x86_64: vfio_region_write(0000:04:00.0:region1+0xa8ec8, 0x0,8) failed: Device or resource busy
vfio-pci 0000:04:00.0: BAR 1: can't reserve [mem 0xd0000000-0xdfffffff 64bit pref]
make this type of script and run everytime array starts or manually run from console.
#!/bin/bash
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind