Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

VFIO · KVM / QEMU

Direct 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.

When to use this

Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → VFIO. Establish effective host/runtime state before changing configuration.

First 30 seconds

1. VFIO binds devices for safe passthrough.

2. Bind early with vfio-pci ids=.

3. Rebuild initramfs after changes.

4. Check IOMMU on.

5. Watch reset issues.

Operational verification

device → vfio-pci → QEMU

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A VFIO-bound device shows host-side binding only, but it does not show safe group isolation, QEMU assignment, guest initialization or migratability.

Platform / version applicability
kvm-qemu
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.

Platformkvm-qemu
Scope / prerequisiteUse this topic when the symptom or planned change has been narrowed to KVM / QEMU → VFIO. Establish effective host/runt…
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.

3 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 Verification path Verify boundary

PCI function → IOMMU group → VFIO kernel interfaces → QEMU device backend → guest PCI topology/driver → workload

Step 2 Effective-state and workload closure Verify boundary

Local intent: VFIO is the Linux userspace device-assignment framework commonly used by QEMU/KVM to access IOMMU-protected devices for secure PCI passthrough.

Step 3 Branching troubleshooting Narrow the fault

Path: Virtualization → KVM / QEMU → VFIO. Local intent: VFIO is the Linux userspace device-assignment framework commonly used by QEMU/KVM to access IOMMU-protected devices for secure PCI passthrough.

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
  • 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.
Key checks
  • lspci -nnk | grep -B2 vfio-pci — bound devices
  • cat /etc/modprobe.d/vfio.conf — ids binding
  • dmesg | grep -i vfio — errors
ReferenceWhy it matters1 section · depth on demand

Internals and state

Local intent: VFIO is the Linux userspace device-assignment framework commonly used by QEMU/KVM to access IOMMU-protected devices for secure PCI passthrough.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A VFIO-bound device shows host-side binding only, but it does not show safe group isolation, QEMU assignment, guest initialization or migratability.

In depth

VFIO on KVM hosts — binding devices persistently and checking the result:

# /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:2204,10de:1aef
softdep nvidia pre: vfio-pci
# /etc/modules-load.d/vfio.conf
vfio-pci

dracut -f   # or update-initramfs -u
lspci -nnk -d 10de:

softdep ensures vfio-pci claims the device before the vendor driver. On distributions with Secure Boot, signed modules matter; vfio-pci is in-tree so it loads normally.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 dockvm-qemu current

Authoritative/upstream documentation reviewed for bounded claims in KVM / QEMU → VFIO. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.qemu.org/docs/master/ · confidence 94%
Terminology layer

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.

Aliases that resolve here
vfio pcivfio-pcikvm vfioiommu group vfio
Embedded reference data

Quick lookup tables

KVM / QEMU → VFIO reference map

Fast operational boundaries and evidence limits for KVM / QEMU → VFIO.

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → VFIO definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired for end-to-end closure
Confirmation

Confirm action

Continue?