Differences between revisions 3 and 4
Revision 3 as of 2021-02-21 00:46:10
Size: 4418
Editor: ?NeilVanDerWal
Revision 4 as of 2021-02-21 07:09:30
Size: 4460
Editor: PaulWise
Comment: put new PCI page into the PCI namespace
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from PCI_Passthrough

Translation(s): none


This is a work in progress guide on setting up PCI Passthrough on Debian Buster. I am creating a new, separate page from VGAPassthrough on the following grounds:

  • "VGA passthrough" refers to only the passing through of a video card; USB, audio, etc. passthrough is also possible in much the same way.
  • The VGAPassthrough page uses pure Qemu for historical reasons. Libvirt is much easier for beginners and has improved since the old page was written.
  • Trying to reconcile the differences between modern guides and the VGAPassthrough page was proving impossible for me.

As no one else is updating this guide, please indulge me and let me work on a separate page. Once it's done, I or someone else will post on the forum and we can discuss how to merge the two guides.

Anyone is welcome to help me. This is not a declaration to leave me alone. I just think a separate page is better at this time.


You can leave comments about the above paragraphs here.


From the Arch Wiki; Quote:

A VGA Passthrough relies on a number of technologies that are not ubiquitous as of today and might not be available on your hardware. You will not be able to do this on your machine unless the following requirements are met :

  • Your CPU must support hardware virtualization (for kvm) and IOMMU (for the passthrough itself)
  • Your motherboard must also support IOMMU
    • Both the chipset and the BIOS must support it. It is not always easy to tell at a glance whether or not this is the case, but there is a fairly comprehensive list on the matter on the Xen wiki as well as Wikipedia:List of IOMMU-supporting hardware.

  • Your guest GPU ROM must support UEFI.
    • If you can find any ROM in this list that applies to your specific GPU and is said to support UEFI, you are generally in the clear. All GPUs from 2012 and later should support this, as Microsoft made UEFI a requirement for devices to be marketed as compatible with Windows 8.

You will probably want to have a spare monitor or one with multiple input ports connected to different GPUs (the passthrough GPU will not display anything if there is no screen plugged in and using a VNC or Spice connection will not help your performance), as well as a mouse and a keyboard you can pass to your VM. If anything goes wrong, you will at least have a way to control your host machine this way.

End Quote

Enabling IOMMU

Intel VT-d/AMD-Vi and IOMMU need to be enabled in the BIOS/UEFI. VT-d/AMD-Vi may simply be called 'virtualization' or some similarly ambiguous term. Do note that you may need to alter the settings from 'Auto' to 'Enabled' as sometimes that makes a difference.

Once IOMMU is enabled in the BIOS/UEFI, then you need to tell Linux to use it. Edit your Grub config at /etc/default/grub. Add the following to the GRUB_CMDLINE_LINUX_DEFAULT line. Add it between the double quotes and following other space-separated options.

  • For Intel: intel_iommu=on

  • For AMD: amd_iommu=on

From the Arch Wiki; Quote:

You should also append the iommu=pt parameter. This will prevent Linux from touching devices which cannot be passed through.

End Quote

Then run:

# update-grub

to generate a new Grub config.