decisions

§86 appendix: what the VT-d exercise needed, who may forge an interrupt, and reversibility

Three passages of §86 (whether an NVMe driver can leave the kernel, and what capability would let it). The main page is complete without this one, which exists to verify or challenge it. "Above" and "below" mean the main page. The first section continues that page's "Recommendation" after its paragraph on the VT-d exercise. Three milestones are cited here by number alone. They are milestone 87 (the x86_64 bare-metal machine), milestone 227 (a GICv3 driver, because GICv2 boots and silently loses every interrupt) and milestone 261 (the NVMe driver leaves the kernel, on the machine that can finally confine it).

Recommendation

Getting there took two fixes, neither of which is a confinement-contract difference between VT-d and the other two IOMMUs, and both recorded in full in notes/non-volatile-memory-express.md's new "What x86_64 needed that the other two did not" section:

Both are the kind of gap only a real, non-virtio DMA device on a real PVH boot could have found (virtio's BARs and a bare boot's initrd never got close to either edge). And both would in principle also bite a real UEFI x86 machine (milestone 87), which is why neither fix is architecture-conditional. They check against what is actually true (which window is mapped, which bytes the kernel has claimed) rather than against which architecture is running. Neither changed the driver's shape, the system call surface, or the confinement contract itself.

With this data point in, the two data points §86 was waiting on are the JH7110 board and the VT-d/NVMe exercise; the second is now done. This section still does not decide option 1 versus option 2; it reports that the confinement claim itself has now been checked, not merely built, on all three of this tree's targeted architectures.

If the answer is option 1 permanently, nothing is blocked, and notes/non-volatile-memory-express.md's BUGS entry becomes the standing record. If it is never decided, the driver silently becomes load-bearing kernel code, which is how a microkernel stops being one; that is the failure this entry exists to prevent.

The axis nothing in this section has named: who may forge an interrupt

VFIO refuses to hand a device to an untrusted userspace driver on a machine without interrupt remapping. And the escape hatch is a module parameter named allow_unsafe_interrupts (mechanism confirmed by search paraphrase, not by a fetched kernel source file; the driver-api page says only the general "Many modern systems now provide DMA and interrupt remapping facilities to help ensure I/O devices behave within the boundaries they've been allotted"). The reason is that an MSI or MSI-X message is a memory write to an architecturally special address, so plain DMA remapping does not confine it. A driver that can write the MSI-X table can aim an interrupt wherever the platform will deliver one.

Every option here that maps any part of BAR0 to EL0 has to answer where the MSI-X table lives and who may write it, and this tree has never asked. Measured, not asserted:

So the gap is latent rather than live, and it becomes live the moment a driver leaves the kernel and wants interrupts instead of polling. A driver has since left the kernel (milestone 261's EL0 NVMe server, 2026-09-17) and it polls, so the gap is still latent by choice rather than by accident. notes/interrupts.md records that this tree's polling is a confinement choice wearing a performance choice's clothes.

And this section's own reasoning needs one correction, which is the point of the amendment above. It treated the gap as unexercisable because the platforms did not offer the mechanism. Two of three do. What is missing is a kernel that enables it, which is a smaller and far more answerable thing than a platform that lacks it. calef declined to mint the MSI-X ownership decision on 2026-09-17 for want of an experiment; milestone 317 built the experiment the next day, and the question can now be prototyped rather than argued. riscv64 makes it cheapest: the mechanism is one mode field in a structure attach already writes, so it needs neither a new capability nor a new driver.

The parity shape belongs in whatever this becomes (DECISIONS §19): x86_64 and riscv64 can offer interrupt remapping, aarch64 cannot until milestone 227, so any claim built on it starts with a recorded gap rather than acquiring one later. Whatever this section settles has to say who owns the page holding the MSI-X table, because that is the one part of the confinement claim an IOMMU doing DMA remapping does not cover.

It is work rather than argument, so it has a home. notes/confinement-claims.md now carries it as a fifth claim that is stated nowhere, beside the timing and device-values entries milestone 202 put there for the same reason, with the two runner flags that would make it exercisable at all. A proposal file under design/roadmap/proposals/ would be the better home and was written first. script/roadmap --check rejects that directory on main today, because the convention lands with milestone 247 (follow-on work named by a finished milestone goes nowhere) and has not merged. When it does, this belongs there.

Reversibility, and who has acted