Virtualization · KVM / QEMU
PCI Passthrough
Cheat sheet · https://pcornel.dk/topic.php?topic=3801
Answer
Safe assignment requires firmware/IOMMU support, viable isolation groups, host driver detachment, VFIO ownership, QEMU device assignment and a working guest driver.
Remember
- IOMMU enabled ≠ device isolated safely.
- Device bound to VFIO ≠ guest successfully owns it.
- Guest device visible ≠ workload uses it correctly.
- Passthrough can restrict migration, snapshots or reset behavior depending on device support.
First checks
virsh nodedev-list --cap pci— PCI devicesvirsh nodedev-detach pci_0000_01_00_0— detach to vfiovirsh dumpxml <vm> | grep -A5 hostdev— assigned
Verify in this order
host PCI device → vfio → QEMU → guest
Where it usually breaks
First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.
KVM / QEMU → PCI Passthrough reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU → PCI Passthrough definition or configuration is present | Configured state does not prove runtime behavior |
| Runtime | Relevant KVM/QEMU/libvirt object or process is active without matching errors | Runtime state does not prove dependencies or guest outcome |
| Dependency | Host CPU/memory, storage, network or device backend required by this path is healthy | Local success does not prove the next boundary |
| Acceptance | Original guest/application test succeeds after the change or observation | Required for end-to-end closure |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3801