Use this when passing PCIe devices like NVMe or GPUs and needing proper PCIe topology.
PCIe Passthrough
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.
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.
PCIe device → vfio → q35 root port → guest
Context & applicabilityCommon mistakes · platform/version boundaries
- Device shares an IOMMU group with other devices, so it cannot be passed alone.
- Host driver still bound to the device — bind to
vfio-pciearly (/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.
Operational reference
Fast context before you go deeper.
qm config 101 | grep hostpciVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
- Use q35/PCIe machine type.
- UEFI firmware recommended.
- Large BARs need Above 4G decoding.
lspci -vv -s <bdf> | grep -i -e LnkSta -e ACS— PCIe link and ACSqm 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
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%