Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

PCIe Passthrough

Direct answer

PCIe passthrough is device assignment for PCI Express hardware such as GPUs, NVMe drives and NICs. Use a PCIe-capable machine type (for example q35) and UEFI firmware so the guest sees the device on a proper PCIe topology.

When to use this

Use this when passing PCIe devices like NVMe or GPUs and needing proper PCIe topology.

First 30 seconds

1. PCIe passthrough on q35 exposes a PCIe topology to the guest.

2. Needed for some GPUs/NVMe features.

3. ACS support decides group isolation.

4. Check link speed in guest.

5. ROM/reset quirks for GPUs.

Operational verification

PCIe device → vfio → q35 root port → guest

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common problems
  • Device shares an IOMMU group with other devices, so it cannot be passed alone.
  • Host driver still bound to the device — bind to vfio-pci early (/etc/modprobe.d/vfio.conf).
  • VMs with passthrough cannot live migrate or snapshot memory.
  • Devices that do not reset properly (reset bug) needing a host reboot between VM restarts.
Platform / version applicability
virtualization-hardware
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization-hardware
Key commandqm config 101 | grep hostpci
Scope / prerequisiteUse this when passing PCIe devices like NVMe or GPUs and needing proper PCIe topology.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
lspci -nnk -s 01:00.0           # Kernel driver in use: vfio-pci
dmesg | grep -i vfio
qm config 101 | grep hostpci

In the guest, the device should appear with the vendor driver loaded.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Use q35/PCIe machine type.
  • UEFI firmware recommended.
  • Large BARs need Above 4G decoding.
Key checks
  • lspci -vv -s <bdf> | grep -i -e LnkSta -e ACS — PCIe link and ACS
  • qm set <vmid> --hostpci0 <bdf>,pcie=1 — PCIe on q35 (Proxmox)
  • dmesg | grep -i vfio — VFIO errors
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

PCIe passthrough steps on KVM/Proxmox:

1. Enable VT-d/AMD-Vi in firmware and kernel (intel_iommu=on iommu=pt).

2. Check the device's IOMMU group contains only that device (and its functions).

3. Bind the device to vfio-pci instead of its host driver.

4. Add it to a q35 VM with UEFI.

lspci -nn | grep -i nvidia          # vendor:device IDs
echo 'options vfio-pci ids=10de:2204,10de:1aef' > /etc/modprobe.d/vfio.conf
update-initramfs -u; reboot
lspci -nnk -s 01:00.0               # Kernel driver in use: vfio-pci
qm set 120 --machine q35 --hostpci0 0000:01:00,pcie=1,x-vga=1
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Setup steps (KVM/Proxmox)

1. Enable VT-d/AMD-Vi and IOMMU in BIOS and kernel.

2. Check the device's IOMMU group is clean.

3. Bind the device to vfio-pci (options vfio-pci ids=10de:2484 in /etc/modprobe.d/vfio.conf, update initramfs).

4. Assign it: qm set 120 --hostpci0 0000:01:00.0,pcie=1 (q35 machine type, OVMF).

5. Install the vendor driver in the guest.

The VM needs full memory reservation and cannot live-migrate.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization-hardware current

Authoritative/upstream documentation reviewed for bounded claims in PCI & Device Passthrough → PCIe Passthrough. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/driver-api/vfio.html · confidence 94%
Confirmation

Confirm action

Continue?