VFIO
Cheat sheet · https://pcornel.dk/topic.php?topic=3802
Answer
VFIO is the Linux framework that gives a VM direct, secure access to a physical PCI device such as a GPU or NIC. It uses the IOMMU to isolate the device's memory access; every device in the same IOMMU group must be passed through together.
Remember
- VFIO driver bound ≠ IOMMU group safe to assign.
- IOMMU group ≠ individual PCI function when hardware topology groups devices together.
- VFIO ownership ≠ guest driver loaded.
- VFIO migration capability is device and QEMU/kernel dependent, not universal.
First checks
lspci -nnk | grep -B2 vfio-pci— bound devicescat /etc/modprobe.d/vfio.conf— ids bindingdmesg | grep -i vfio— errors
Verify in this order
device → vfio-pci → QEMU
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 → VFIO reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU → VFIO 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=3802