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).
#HUGEPAGES QEMU VGA PASSTHROUGH WINDOWS 10#
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). The AMD Ryzen ThreadRipper CPU is, thanks to the enormous core count, perfect for virtualization.