notes

Three proofs in kernel/src/arch/aarch64/iommu.rs (milestones 255 and 1066)

Name: provisional, minted 2026-10-11 (UTC) by lane/fourth-ten-longest-notes. That lane moved the main page's two per-file proof sections here under ยง212 (a prose budget). The SMMUv3 pair is from milestone 255 (a quarter of kernel/src/arch/ has no assembly in it), and the IO APIC pair is from milestone 304 (cargo kani -p kernel only ever compiled one architecture). Each file takes its name from the code it proves. calef names files.

An appendix to notes/kernel-proofs.md, which states what is proved. Two came from milestone 255 (a quarter of kernel/src/arch/ has no assembly in it), and the third from milestone 1066 (the IOMMU device tables grow past 64 devices), which made the stream table two-level.

The SMMUv3 driver is aarch64's IOMMU. It has no asm! in it at all. What it computes is which physical addresses a device may touch, which is what design/fatal-risks/README.md risk 7 rests on. The word arithmetic was inline in attach, tangled with the volatile writes that make that function unreachable. It is now five functions in the same file, and attach is shorter for it. Nothing moved out of arch/, which is milestone 193's option A held to and milestone 244's refusal of option B applied again.

All three were falsified, and the falsifications are the argument. Each patch leaves every test in the tree green. QEMU's virt board puts RAM at 0x4000_0000, so bit 31 of a domain root is clear and ttb >> 31 agrees with ttb >> 32 on this board. A leaf offset left at the linear table's rid * 64 agrees with the right one for every stream below 64. And QEMU reads SPAN as 2^SPAN entries where the specification says 2^(SPAN - 1), so a SPAN one short passes under QEMU and halves every leaf on silicon. script/falsifications --sweep kernel replays all three.

What this does not cover, said here as well as at the harness. The register offsets and bit constants are unproved and unprovable in this tree. A harness asserting the constant it was given is a tautology, and if Arm IHI 0070 was misread then the code and the proof are wrong together. That is why the_iommu_faults_a_dma_that_escapes_the_domain in kernel/src/virtual_io.rs is not made redundant by this. And a property proved of the SMMUv3 is not proved of the other two IOMMUs. riscv64/iommu.rs writes its device context in 64-bit stores with no split at all, so this property has no counterpart there. x86_64/ is not even compiled under Kani on an aarch64 host.