Hardware isolation deep dive

Passthrough is a DMA security decision.

A visible PCI device is not automatically safe to assign. The real boundary is whether every memory transaction and every related function can be isolated, reset and recovered.

Data path

Guest → VFIO → IOMMU → PCIe device

The IOMMU limits device DMA to mapped memory. Intel commonly calls the platform feature VT-d; AMD calls it AMD-Vi. CPU virtualization alone does not create this DMA boundary.

Inspect, do not assume

The group is the minimum isolation unit.

find /sys/kernel/iommu_groups/ -type l \
  -printf '%h: ' -exec basename {} \;
lspci -nnk -s 01:00.0
dmesg | grep -Ei 'DMAR|IOMMU|AMD-Vi'

Every function in a group must remain in a state that preserves isolation. Multifunction GPUs often bring an audio function; bridges can place several endpoints in one group.

Failure modes

Four reasons “it appears in the list” is not enough.

01

Reset

Some devices cannot return to a clean state after guest shutdown. The next VM start may fail until the device or host resets.

02

Host ownership

The host must release the active driver. Passing the only display GPU can remove local recovery access.

03

Topology

Group membership, bridges and peer-to-peer DMA determine whether assignment preserves isolation.

04

Lifecycle

Snapshots, suspend and live migration are generally unavailable for a directly assigned physical device.

Choose the device model deliberately

ModelIsolation unitMobilityTypical use
Full PCI passthroughPhysical function / IOMMU groupLowDedicated GPU or NIC
SR-IOVVirtual functionProvider-dependentHigh-throughput networking
mdev / vGPUMediated device sliceVendor-dependentShared accelerator
Emulated / virtioVMM device modelHighestPortable general workloads

What can still affect the host?

Ordinary guest DMA should be confined by the IOMMU. Remaining risks include device firmware defects, broken reset behavior, bus errors, incorrect platform tables and IOMMU implementation or configuration flaws. “Guest driver failure crashes the host” is too broad; investigate the actual hardware path.