Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → PCI Passthrough. Establish effective host/runtime state before changing configuration.
PCI Passthrough · KVM / QEMU
Safe assignment requires firmware/IOMMU support, viable isolation groups, host driver detachment, VFIO ownership, QEMU device assignment and a working guest driver.
1. libvirt <hostdev mode='subsystem' type='pci' managed='yes'> assigns devices.
2. managed=yes detaches automatically.
3. Check IOMMU groups.
4. UEFI/q35 for GPUs.
5. No migration.
host PCI device → vfio → QEMU → guest
Context & applicabilityCommon mistakes · platform/version boundaries
Successful assignment shows a device crossed the host/guest ownership boundary, but it does not show isolation quality, reset safety, guest driver health or application acceleration.
Operational reference
Fast context before you go deeper.
Verification & 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 Verification path Verify boundary
Hardware/firmware IOMMU → kernel IOMMU group → VFIO binding → libvirt/QEMU hostdev assignment → guest driver → device workload
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.
- 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.
virsh nodedev-list --cap pci— PCI devicesvirsh nodedev-detach pci_0000_01_00_0— detach to vfiovirsh dumpxml <vm> | grep -A5 hostdev— assigned
ReferenceWhy it matters1 section · depth on demand
Internals and state
Local intent: PCI passthrough assigns a host PCI function directly to a KVM/QEMU guest, normally through VFIO and an IOMMU, reducing emulation while increasing hardware, isolation and migration constraints.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Successful assignment shows a device crossed the host/guest ownership boundary, but it does not show isolation quality, reset safety, guest driver health or application acceleration.
In depth
PCI passthrough on plain KVM/libvirt:
virsh nodedev-list --cap pci | grep 01_00
virsh nodedev-detach pci_0000_01_00_0 # bind to vfio-pci
<hostdev mode='subsystem' type='pci' managed='yes'>
<source><address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/></source>
</hostdev>
virsh nodedev-reattach pci_0000_01_00_0 # give back to host
managed='yes' lets libvirt detach/reattach the device automatically on VM start/stop.
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 KVM / QEMU → PCI Passthrough. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.qemu.org/docs/master/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
KVM / QEMU → PCI Passthrough reference map
Fast operational boundaries and evidence limits for KVM / QEMU → PCI Passthrough.
| 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 |