No one mentioned a working setup for VFIO/IOMMU GPU passthrough.
No one mentioned a working setup for VFIO/IOMMU GPU passthrough.
I built something using Gentoo without systemd. I needed a setup that could run two copies of a game and stream one version to another system that couldn’t handle it. The hardware included a Ryzen 7 (first gen), RX580 GPU, R9270x slave GPU, B350 Mobo ZFS pool with storage. I spent considerable time adjusting KVM’s processor mapping so the guest recognized the Ryzen 7’s four cores and eight threads correctly—avoiding it being mistaken for an opteron. I also set CPU pinning to IO threads. Running two AMD cards was tricky, but I disabled their PCI bus in the kernel boot option so only the primary card connected to the AMDGPU module. Synergy helped coordinate mouse input between both systems. It functioned adequately: games played smoothly or sufficiently. However, I observed that host processes often dominated the guest environment. Even though the host retained full CPU access, tasks assigned to guest cores would drop significantly if the host allocated them. This behavior persisted unless I restricted shared resources using Linux cgroups and assigned non-shared cores to specific users. The process became too complex for my needs, so I abandoned it. Ultimately, if you need a portage build on the host, consider skipping the guest entirely—Windows would still struggle with multi-threaded tasks on the same machine. This approach isn’t a complete solution for cross-platform gaming, nor does it aid native Linux game development.
You need to connect a monitor to the GPU via a cable, as the VM requires a display linked directly to the card. I suggest using a cable from the card to your screen and adjusting the input settings on the display when you switch to Windows. EDIT: They mentioned a concept called "looking glass" in their video, but I haven't tested it yet, so I can't say how challenging it is to implement. Link to the video:
I managed to get it partially functional, but I think I'll delay the project until I have a new SSD. I'm exhausted from constantly reinstalling Windows whenever it fails. Also, the GPU was linked to the monitor and it did send data, though some settings might have been incorrect (probably my mistake). This meant Windows recognized the card's details but couldn't accurately identify its VRAM size, which caused benchmarks to crash.
Hi, don't worry it is not that hard. The main fact is that even the Arch Wiki is not totally complete and there is no clear and easy documentation about PCI pass through-ing about some issues that can occur. You are probably missing the VBIOS for your GPU. Also, using an UEFI bios is required...
Wait, I wasn't aware you required the VBIOS. It could very well be the issue then.