![]() ![]() vfio_pci vfio vfio_iommu_type1 vfio_virqfd nouveau. $ sudo nano /etc/nf # Locate the line that sais MODULES=(.) # And add those values (Make sure that nouveau is after vfio) MODULES=(. Now we need to tell the kernel to load vfio-pci before nouveau (which is the module that binds the GPU to the host). " # Save the file, quit nano and update grub $ sudo update-grub ![]() Now add this in /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT # Edit your grub file $ sudo nano /etc/default/grub # Add the following value like such GRUB_CMDLINE_LINUX_DEFAULT=". That said, in a follow up blog, we will make it so we can share the GPU between the host and guest when it is not in use.įirst we need to add the following kernel parameter to GRUB (make sure to update it with your device ids) vfio-pci.ids=10de:10fa,10de:1fb9 Right now we will bind it to vifo-pci very early in the boot process as it is a lot simpler then configuring bumblebee and makes it easier to troubleshoot issues. Now we need to make sure that the operating system doesn’t load the GPU and that the card is free to be passed to the VM. See this link for a detailed explanation. Note that there is a third device which is the PCI Bridge but it shouldn’t be passed to the VM or isolated Here the id of the audio device is 10de:10fa and the graphics card is 10de:1fb9 but they will differ if you have a different configuration. Here is my output as an example: IOMMU Group 1: 00:01.0 PCI bridge : Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 0d) 01:00.0 VGA compatible controller : NVIDIA Corporation TU117GLM (rev a1) 01:00.1 Audio device : NVIDIA Corporation Device (rev a1) Now locate your graphics card IOMMU group and note the IDs of the audio device and the card itself (ex: 10de:13c2). If you see several groups then your machine is correctly configured. Documents/iommu.sh IOMMU Group 10: 00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) IOMMU Group 13: 06:00.0 VGA compatible controller: NVIDIA Corporation GM204 (rev a1) 06:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1) Make it executable and execute it from your home # From your home, execute $. Save the following script to ~/Documents/iommu.sh (or anywhere that suits your purpose) #!/bin/bash shopt -s nullglob for g in /sys/kernel/iommu_groups/* do echo "IOMMU Group $)" done done " # Save the file, quit nano and update grub $ sudo update-grub # Reboot $ sudo reboot now Optional: If you are running Linux 5.12+ set your preemption settings to voluntary # Edit your grub file $ sudo nano /etc/default/grub # Locate the line containing GRUB_CMDLINE_LINUX_DEFAULT="." # Add the following value like such if you are running linux =5.12 GRUB_CMDLINE_LINUX_DEFAULT=". If there is no output related to IOMMU as a result of running this command then you need to enable IOMMU as a kernel parameter. $ sudo pacman -S qemu libvirt edk2-ovmf virt-manager ebtables dnsmasq Step 1 - Setup IOMMU and Preemption (Kernel ≥ 5.12)įirst we need to establish if IOMMU is enabled on your machine: # Check whether IOMMU is enable on your system $ sudo dmesg | grep -i -e DMAR -e IOMMU ACPI: DMAR 0x00000000BDCB1CB0 0000B8 (v01 INTEL BDW 00000001 INTL 00000001) Intel-IOMMU: enabled. If you are asked to replace the package iptables with iptables-nft, answer yes. You must have installed QEMU and all of its dependencies. This setup is meant to work on an external monitor and has only been tested using HDMI output but should work with all output ports. In a later guide we will see about dynamically binding GPU to the host and the guest using bumblebee so that we can use external monitors with both OSes. In this setup we will pass the laptop’s Quadro T1000 to the virtual machine and leave the iGPU for the host. The host machine is running Manjaro Linux and QEMU/KVM wrapped by libvirt as a virtualization provider. The purpose of this blog post is to provide a collated guide for the setup of a graphically accelerated virtual machine for the purpose of gaming or productivity on a Windows 10 Guest. GPU Passthrough on a Dell Precision 7540 and other high end laptops
0 Comments
Leave a Reply. |