Pcornel
Virtualization · PCI & Device Passthrough

IOMMU

Cheat sheet · https://pcornel.dk/topic.php?topic=3545

Back to the Topic

Answer

The IOMMU (Intel VT-d, AMD-Vi) translates and isolates device DMA so a passed-through device can only access its VM's memory. Enable it in firmware and on the kernel command line (intel_iommu=on or amd_iommu=on).

Remember

  • Enable in firmware and kernel.
  • Interrupt remapping matters.
  • No IOMMU = no safe passthrough.

First checks

  • dmesg | grep -e DMAR -e AMD-Vi — IOMMU on
  • cat /proc/cmdline — intel_iommu=on iommu=pt
  • ls /sys/kernel/iommu_groups/ | wc -l — groups count

Verify in this order

firmware → kernel IOMMU → groups

Where it usually breaks

First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3545

Confirmation

Confirm action

Continue?