← Revision 5 as of 2021-02-26 20:20:30
|Deletions are marked like this.||Additions are marked like this.|
|Line 1:||Line 1:|
= Note =
This is a '''work in progress''' guide on setting up PCI Passthrough on Debian Buster. I am creating a new, separate page from [[https://wiki.debian.org/VGAPassthrough|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.
= Comments =
You can leave comments about the above paragraphs here.
= Hardware =
From the [[https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF|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)
* [[https://ark.intel.com/Search/FeatureFilter?productType=873&0_VTD=True|List of compatible Intel CPUs (Intel VT-x and Intel VT-d)]]
* All AMD CPUs from the Bulldozer generation and up (including Zen) should be compatible.
* CPUs from the K10 generation (2007) do not have an IOMMU, so you '''need''' to have a motherboard with a [[https://support.amd.com/TechDocs/43403.pdf#page=18|890FX]] or [[https://support.amd.com/TechDocs/48691.pdf#page=21|990FX]] chipset to make it work, as those have their own IOMMU.
* 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 [[https://wiki.xen.org/wiki/VTd_HowTo|Xen]] wiki as well as [[https://en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware|Wikipedia:List of IOMMU-supporting hardware]].
* Your guest GPU ROM must support UEFI.
* If you can find [[https://www.techpowerup.com/vgabios/|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.
= 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.
to generate a new Grub config.
= Resources =