FIELD NOTES / IOMMU · ONE GUIDE, 26 CHAPTERS
Follow one request. Find every guide.
The bright line is the path a DMA request takes, from device to memory. Each star is a guide or lab, placed at the step it explains. The PCIe link the request crosses first has its own guide and map.
Guide map
- Start: 16 bytesFollow one DMA request. Watch an address become a memory access. Then break the mapping and test what recovery requires. Device · Guided story · 5 steps
- IOMMU foundationsFollow the request. Test the protection. What an IOMMU does, which structures decide the outcome, and how negative tests separate a working protection path from a misleading success. IOMMU · Guided story · ≈ 22 min
- Walk boundariesTesting an address-translation walk Page tables, permissions and boundaries in a four-level teaching walk. Memory · Guided story · ≈ 3 min
- Translation labIOMMU translation & DMA validation. Trace a device request from its address space to memory, or to a fault. Configurable host levels, GCR3 depth and 4 KiB, 2 MiB and 1 GiB leaves. Page walk · Interactive lab · ≈ 13 min
- Linux DMA buffersFollow the buffer. Explain the fault. Use a Linux-style bounce buffer, then inspect the bytes and fault records produced by the emulated IOMMU. Software · Interactive lab · ≈ 8 min
- Command & event buffersWho writes the next entry? Ownership, ordering and completion make a buffer useful. Command lab, event log, PRI lifecycle and a GA entry decoder. IOMMU · Interactive lab · ≈ 10 min
- Interrupts & GA logFollow the interrupt. Inspect the evidence. Inject a fault, watch the relevant buffer and inspect the guest’s pending interrupt in memory. IOMMU · Interactive lab · ≈ 10 min
- IOTLB & cache stateWhich state did the request use? Change a mapping, keep a cached copy, then follow the bytes or interrupt. A request can succeed and still reach the wrong destination. IOMMU · Interactive lab · 9 experiments
- IOMMU groups & ACSWhy can't the VM have just this one device? Requester-ID aliases, peer-to-peer writes that turn around in a switch, and ACS. Build the IOMMU groups the way Linux does and see what VFIO needs. PCIe request · Interactive lab · ≈ 9 min
- Shared page tables
- Virtual IOMMUWho decides where the VM's device can write? Send one write through a guest's table and the host's. Remap, revoke and invalidate, and watch which RAM page changes. Page walk · Interactive lab · ≈ 8 min
- Passthrough & isolationWho may a device reach, and who may take it? IVRS firmware tables, four ways to give a guest a device, VFIO and iommufd, a Thunderbolt DMA attack, default domains, SR-IOV requester IDs and the RISC-V IOMMU, as eight experiments. Software · Interactive lab · ≈ 12 min
- Confidential VMsWho can touch a confidential VM's memory? Write a secret, then let the host try: SEV-SNP's Reverse Map Table, page validation and privilege levels, with Intel TDX and Arm CCA beside them. Security · Interactive lab · ≈ 7 min
- Secure DMACan a device reach private memory? The emulated IOMMU with SEV-SNP on: RMP checks, RMP_PAGE_FAULT bit by bit, register locks, the completion store and Secure ATS. Security · Interactive lab · ≈ 6 min
- Buffer workbookFollow 16 bytes through a bounce buffer. Linux's own copies, and what the host can read at each step: receive leaks, failed maps, expired checks and half-done transfers. Security · Interactive lab · ≈ 3 min
- Trusted I/OWhen may a device use private memory? SEV-TIO step by step: authenticate, bind, accept, start, grant. Device privilege levels, secure MMIO and the ASID fence. Security · Interactive lab · ≈ 5 min
- AttestationWho should receive the secret? A verifier's checks in order: signature, measurement, policy, TCB, a fresh challenge and the session. Real hashes and AES-GCM. Security · Interactive lab · ≈ 4 min
- What SNP does not coverWhat does SNP not cover? Supported, enabled, selected, verified: evidence at every layer, SNP extensions, and what stays the guest's job. Security · Interactive lab · ≈ 4 min
- Request identityWhat did the client actually send? Separate client intent from observed DMA, translation faults and interrupt delivery. 112 test recipes across AMD IOMMU, Arm SMMUv3 and PCIe. PCIe request · Interactive lab · ≈ 60 min
- Faults & recoveryBreak the assumption. Test the recovery. Presence, permissions, invalid encodings, lost notifications and stopped engines. Failure paths deserve the same care as a successful translation. Page walk · Interactive lab · ≈ 6 min
- Raw-records workbenchFrom raw bits to a checked path. Decode the evidence. Change the state. Check what the device was actually allowed to do. Memory · Interactive lab · ≈ 6 min
- AMD referenceAMD IOMMU: the engineering reference Alignment, lookup structures, command completion and GA records, connected to the working lab. Reference · ≈ 11 min
- Arm SMMUv3 notesArm SMMUv3: what changes Compare device identity, translation, alignment, queues and recovery before reusing an AMD IOMMU model. Reference · ≈ 13 min
- RISC-V IOMMUWhich identity and tables decided where the bytes went? Device and process contexts, a nested walk, a fault with no payload write, cache maintenance, ATS and PRI, and the separate MSI path, on a RISC-V IOMMU. Reference · Interactive lab · 8 experiments
- Model limits & C++What this mock can demonstrate A small executable model with explicit boundaries, and how to reuse its C++. Reference · ≈ 5 min
- GlossaryKey terms in the guide Plain meanings, full names, and the chapters that use each term. Reference · ≈ 10 min
Constellations
Four ways through the guides, each drawn as the shape it makes on the map. Follow one, or draw your own.
-
NEW TO IOMMUS
First Light
One request from device to memory, the structures that decide it, a hands-on walk and what failure looks like.
5 stops · ≈ 44 min + 5 steps
-
VALIDATION ENGINEERS
The Validator
Request identity, stale caches, shared tables, fault recovery and interrupt evidence: the places a pass can mislead.
7 stops · ≈ 117 min + 9 experiments
-
READING THE SPECS
Deep Field
AMD and Arm structures side by side, raw records decoded, the command and event buffers, then the glossary.
6 stops · ≈ 72 min
-
CONFIDENTIAL COMPUTING
The Vault
Keep the host out of a VM's memory, then decide which device and which verifier to trust.
6 stops · ≈ 29 min
The guide, in order
Read it as one book: six parts, each chapter a star above. Every page shows its chapter number and links to the chapters before and after it.
Part 1: Foundations
- Start: 16 bytes 5 steps
- IOMMU foundations ≈ 22 min
- Walk boundaries ≈ 3 min
- Translation lab ≈ 13 min
Part 2: Linux and IOMMU state
- Linux DMA buffers ≈ 8 min
- Command & event buffers ≈ 10 min
- Interrupts & GA log ≈ 10 min
- IOTLB & cache state 9 experiments
Part 3: Virtualization
- IOMMU groups & ACS ≈ 9 min
- Shared page tables ≈ 11 min
- Virtual IOMMU ≈ 8 min
- Passthrough & isolation ≈ 12 min
Part 4: Security
- Confidential VMs ≈ 7 min
- Secure DMA ≈ 6 min
- Buffer workbook ≈ 3 min
- Trusted I/O ≈ 5 min
- Attestation ≈ 4 min
- What SNP does not cover ≈ 4 min
Part 5: Faults and evidence
- Request identity ≈ 60 min
- Faults & recovery ≈ 6 min
- Raw-records workbench ≈ 6 min
Part 6: Reference
- AMD reference ≈ 11 min
- Arm SMMUv3 notes ≈ 13 min
- RISC-V IOMMU 8 experiments
- Model limits & C++ ≈ 5 min
- Glossary ≈ 10 min