roadmap PARTIAL

764. AMD-Vi confines device DMA on x86_64

Raised 2026-10-05 (UTC) by calef's plan to use a recent AMD desktop as fatal risk 9's second x86 machine, after argon. On an AMD machine the ACPI tables carry an IVRS and no DMAR, so the kernel found no IOMMU and printed skipped, no DMAR. The confinement claim silently did not hold there: the NVMe driver ran unconfined and the xHCI driver refused to start. Built and proven under QEMU on patagonia; the first boot on AMD silicon is what remains, which is why this is PARTIAL.

What it does

The kernel reads the IVRS (machine_discovery::acpi::ivrs) and brings up every AMD-Vi unit it names, over a device table in which every entry denies all DMA. It then confines each device the four confine callers (NVMe, e1000e, xHCI, virtio) attach, through the same crate::iommu seam VT-d uses. Faults come from the unit's event log through take_fault. A machine with neither table keeps booting and says so:

  vt-d        : skipped, no DMAR (this machine's IOMMU is AMD-Vi)
  amd-vi      : unit 0xfed80000 up (1 of 1, ivhd type 0x11), 256 device table entries all blocked, translation enabled (status confirmed), 0 ivmd device(s) mapped
  iommu       : NONE: this machine's ACPI names neither a DMAR (VT-d) nor an IVRS (AMD-Vi), so no device's DMA is confined; every driver below runs unconfined

The pieces

notes/amd-vi.md has the reasoning, the six places QEMU 11.1.1 differs from AMD 48882, and the evidence table.

Proof

On the AMD-Vi QEMU machine, the whole x86_64 kernel and system suites pass (129 and 237), the virtio and NVMe DMA-escape tests among them, with the same skips as the VT-d machine. The falsification is a device table entry with Mode 0 and IR/IW kept. It turns the virtio escape test red, replayable through kernel/falsifications/virtual_io.tests.the_iommu_faults_a_dma_that_escapes_the_domain.patch. It turns the NVMe escape test red too, attested on 2026-10-05, since that test's one record is the domain-widening patch every unit shares.

Reuse

None exists to take. crates.io was searched on 2026-10-05 for amd-vi, amd iommu and iommu, and has no AMD-Vi driver. It has an SMMUv3 simulator, VFIO and IOMMUFD wrappers for a Linux host, and a hardware abstraction layer, not examined further because it is a whole HAL rather than a driver. Linux's drivers/iommu/amd/ (GPL-2.0) was read at v6.12 for the order of operations and the leaf bits, and is a client of Linux's IOMMU framework, not something to lift. §46 (thin primitives or whole subsystems) puts an IOMMU driver on the verification path, which is the write-it case.

Follow-on

BUGS

Index row

The confinement claim stops at the IOMMU the kernel can drive, and on x86_64 that was VT-d only, so on any AMD machine every device ran with the whole of memory in reach while the boot read as normal. This makes fatal risk 9's AMD machine a confined one.