Reboot your system and verify IOMMU is activated and that your IOMMU groups are detected (Four in case of the AMD ThreadRipper 2970WX). amd_iommu=on iommu=pt pcie_acs_override=downstream vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 rd.driver.pre=vfio-pci Modify the systemd-boot-loader entries file (normally located at /boot/loader/entries/) and extend the options line with the following: options. Modify the grub configuration at /boot/grub/grub.cfg (or the GRUB_CMDLINE_LINUX entry in /etc/default/grub) and add the following options to the kernel parameters: linux /vmlinuz-linux. Revert to amd_iommu=on, if it's not working for your host.
Iommu=pt or amd_iommu=pt enables IOMMU only for pass-through devices and provides better host performance. Next we need to add some boot parameters to our Linux entry. If one of these settings is not enabled, you may want to rebuilt your kernel. # zgrep -i kvm /proc/config.gzĬONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=yĪnd last, but not least, check that VFIO and VFIO_PCI is enabled (either as module or inbuilt). # zgrep IOMMU /proc/config.gzĪlso check that your Linux Kernel supports KVM. Make sure your kernel supports IOMMU (Input Output Memory Management Unit).
You should enable Windows 10 WHQL Support in the BIOS though, else you can't pass-through the GPU in your first PCI-Express slot (PCIE_1). For the MSI MEG x399 CREATION, you have to enable AMD virtualization, but there is no dedicated setting to enable IOMMU (AMD-Vi). Make sure AMD-V is enabled by running grep svm /proc/cpuinfo. Buying a "cheap" second graphics card for the host is probably the easier solution. You can use KVM GPU pass-through with just one graphic card, but it's quite different to set up (you need to switch on boot) and the host is not available (graphically) meanwhile. Linux distribution is Gentoo, but any recent Linux distribution should just work fine.
I am using an AMD Ryzen ThreadRipper 2970WX with an MSI MEG x399 CREATION motherboard, 64GB of RAM and two graphic cards (AMD Radeon Vega 64 for the Linux host and an passed-through AMD Radeon RX 580 for the Windows 10 virtual machine). Using an AMD ThreadRipper with KVM / QEMU and a passed-through GPU can be a bit tricky tough and there are a lot of performance caveats to look out for. In this guide we are going to set up QEMU / libvirt with KVM to power Microsoft Windows 10 with an passed-through AMD Radeon RX 580.
By passing an graphic card to the VM it's possible achieve almost bare metal GPU performance, which is important for gaming or the use of graphical intensive software (like Adobe Photoshop). You will not be able to interact with it via VNC, noVNC, etc.The AMD Ryzen ThreadRipper CPU is, thanks to the enormous core count, perfect for virtualization. Once SSH is enabled, only use SSH to interact it with it to prevent and display issues. Start the VM without the graphics card and enable SSH. Memory at f5080000 (32-bit, non-prefetchable ) Memory at f4000000 (32-bit, non-prefetchable ) įlags: bus master, fast devsel, latency 0, IRQ 69, NUMA node 0 Memory at fb080000 (32-bit, non-prefetchable ) Ĭapabilities: MSI: Enable- Count =1/1 Maskable- 64bit+Ĭapabilities: Express Endpoint, MSI 00Īdd Virtual Function IO (vfio) kernel modules to load at boot time. Subsystem: NVIDIA Corporation GM204 High Definition Audio Controllerįlags: bus master, fast devsel, latency 0, IRQ 68, NUMA node 0 Memory at d0000000 (64-bit, prefetchable ) Įxpansion ROM at 000c0000 Ĭapabilities: Power Management version 3Ĭapabilities: MSI: Enable+ Count =1/1 Maskable- 64bit+Ĭapabilities: Express Legacy Endpoint, MSI 00Ĭapabilities: Latency Tolerance ReportingĬapabilities: Vendor Specific Information: ID =0001 Rev =1 Len =024 Ġ1:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1 ) Memory at c0000000 (64-bit, prefetchable ) Memory at fa000000 (32-bit, non-prefetchable ) Subsystem: NVIDIA Corporation GM204 įlags: bus master, fast devsel, latency 0, IRQ 70, NUMA node 0 01:00.0 VGA compatible controller: NVIDIA Corporation GM204 (rev a1 ) (prog-if 00 )