roadmap BUILT

261. The NVMe driver leaves the kernel, on the machine that can finally confine it

Built 2026-09-17 under QEMU on all three architectures and closed on xenon 2026-10-04 to 2026-10-05 (status corrected 2026-10-07, when it still read PARTIAL): a confined EL0 process serves the block contract off QEMU's NVMe and xenon's real one. Minted 2026-09-05 by the maintainer. §86 was DECIDED on 2026-09-03 and the work it authorizes has had no milestone since, which is milestone 247's failure class (work identified by a finished piece goes nowhere) applied to a decision rather than to a block. (Number provisional until the merge queue lands it.)

Of the second kind: the machine is on the desk and one thing on it is calef's, below. The driver itself is buildable and testable under QEMU and does not wait for any of it.

What §86 decided, so this block does not reopen it

Option 2a, in its own words: an EL0 NVMe server that adds no system call surface at all, so "the only durable commitment is what an nvme_server's spawn contract says, and this tree changes spawn contracts routinely." Designed so option 4 can be added later without reshaping the driver, and the choice between them settled by measurement rather than argument.

Not reopened here: whether a new Object variant is minted, and whether a validator ships with it. §86 (whether an NVMe driver can leave the kernel) says plainly those are an architect's, and they are option 4's questions, not 2a's.

One premise of §86 has changed, and it matters to this milestone

§86's reading, written 2026-09-03:

fatal risk 6's decisive experiment is "one real, non-virtio device on real silicon, confined, at throughput", the silicon this project owns has no IOMMU, and option 4 is the only entry here that confines without one.

That is no longer true, and nobody had established it when §86 was written. xenon has VT-d and an NVMe behind it. notes/xenon-firmware.md records the machine's own setup UI. A Micron 2450 NVMe 256GB sits on M.2 PCIe SSD-0 with SATA in AHCI rather than RAID, "so the NVMe is a plain PCIe function rather than hidden behind Intel RST", on a machine milestone 87 (bare) selected partly for VT-d. The tour has already reported vt-d: drhd 0xfed90000 up, translation enabled (gsts.tes confirmed) under OVMF.

This does not overturn §86's choice; it strengthens it. Option 4 exists to confine a device on silicon with no IOMMU. On xenon the IOMMU is present, so option 2a plus VT-d is a confined real device at throughput, which is risk 6's decisive experiment without the validator option 4 was reaching for. Option 4 remains what a board without an IOMMU would need, and that is a different machine's problem.

What calef has to do, and it is one thing

Wipe xenon's internal NVMe. The disk currently holds a Windows installation, and a disk this project must not write to is not a disk it can drive. That is what has been standing between this tree and risk 6's decisive experiment rather than any missing hardware.

Done 2026-09-17, per design/fatal-risks/README.md risk 6. Corrected 2026-09-24: this line still read "not done" a week later.

What a lane builds without any of that

An EL0 NVMe server under §86's option 2a, against QEMU's NVMe, which the runner already attaches. crates/non_volatile_memory_express exists (716 lines, host-tested, 25 Kani sites) and kernel/src/non_volatile_memory_express.rs is the in-kernel driver milestone 53 (the board's own peripherals) built. The work is moving the queue mechanics out to a confined process that is handed a doorbell page and a DMA window and nothing else.

The name is an architect's and a lane should ship a provisional one and say so; nvme_server is §86's passing use, not a ratification. Settled 2026-09-18 under DECISIONS §154 (the acronym test): the program is non_volatile_memory_express, sharing its crate's name.

What was built, 2026-09-17

The data plane left the kernel and nothing about the system call surface moved, which is option 2a's whole claim and is the thing to check first: no new Object variant, no new system call number, no new method constant. The split is expressible because NVMe 1.4 §3.1 already put a page boundary where the authority boundary belongs. The controller registers (CC, CSTS, AQA, ASQ, ACQ) are at offsets 0x000..0x1000 and the doorbells start at 0x1000, so "the kernel keeps the admin plane and EL0 gets the data path" is one page mapped and another not.

piece where it is now
reset, admin rings by register, enable, IDENTIFY, Create I/O Queue kernel/src/non_volatile_memory_express.rs, EL1
build a command, copy it to the ring, ring the doorbell, watch the phase tag components/src/non_volatile_memory_express.rs, EL0
every piece of arithmetic either half does crates/non_volatile_memory_express, host-tested, Kani-reachable
what the process is handed and what it is refused kernel/src/user/non_volatile_memory_express_service.rs's Spawn literal

What the server holds, and it is the complete list, because a capability system has no ambient environment: the request endpoint (RECEIVE, filesystem_protocol::blk), a readiness endpoint (WRITE, one message), one page of BAR0 device-typed (the doorbell page at bar0 + 0x1000). And the data plane's pages of one confined DMA region (the two I/O rings and sixteen pages of transfer buffer).

What it is denied, each line a decision rather than an omission:

The test is kernel/src/user/non_volatile_memory_express_tests.rs, one case, green on aarch64, riscv64 and x86_64. A client holding one endpoint gets the disk's size, persists two neighboring blocks under different patterns, reads each one back byte for byte. It is refused a block outside the namespace, gets a flush count that moves, and is refused an opcode the server has no verb for. The second pattern is what proves a write landed where it said and not everywhere: an earlier draft read the neighbor and expected zeros. That is a claim about the disk's prior contents, and true only of a freshly made image. Milestone 318 (the NVMe boot test on real geometry) replaced it with a claim the test itself establishes. Every assertion is written against the geometry the boot was handed rather than against a constant, so the same case proves the same things on QEMU's 8 MiB image and on xenon's 256 GB namespace. It asserts the IOMMU was active, which matters more here than it did for the kernel-resident driver: with the driver at EL0 the IOMMU is the whole of what stops a compromised server reaching memory it was not given.

The prover found a bug that only a real controller could have, and it is the best argument in this milestone for keeping the logic in the crate. A harness asserting that an accepted handoff's doorbell offsets stay inside the one page of BAR0 the server is mapped failed in under a second, on CAP.DSTRD = 15. Doorbell N sits at 0x1000 + N * (4 << DSTRD), so a wide stride scales the doorbell file, and queue 1's submission tail lands a quarter of a megabyte past the window. QEMU reports 0 and every hardware implementation §86 cites is expected to, so no amount of testing on any machine this project owns could have found it. On a controller that did report a wide stride it would have presented as a panic inside the disk driver rather than as a diagnosis. It is now non_volatile_memory_express::MAX_DSTRD, refused in two places: Handoff::unpack, so the data plane cannot be built around it. And the kernel's own bring-up, so such a controller fails loudly at EL1 naming itself rather than starting a process that cannot address its own doorbells.

What crates/non_volatile_memory_express gained, because the rule is that logic stays where the prover reaches it: Handoff (the three spawn scalars, packed and unpacked), Handoff::holds_block (the range check), Handoff::transfer_command (the whole of what the data plane computes), and Command::flush. Three new Kani harnesses cover the handoff's round trip, that an accepted handoff's doorbell offsets stay inside the one mapped page, and that no caller-supplied u64 can wrap into a command for a block the namespace does not have.

The bench boot, built 2026-09-24 without the machine

cargo xtask disk-throughput --stage-only stages the bench image; the boot prints two preflight verdicts, measures, and ends in one verdict line. Procedure, expected output and outcomes: notes/risk-6-bench-evening.md. Building it found that the kernel brought up the DMAR's first VT-d unit, very likely xenon's graphics unit, and called any device confined while any unit translated; that page's first night-of condition has the evidence and the fix.

The first silicon runs, 2026-10-04

Three boots, transcribed in bench/xenon-2026-10-04/ from calef's photographs. Main (milestone 594 in) tore the screen as the VT-d units came up. The image from before milestone 594 passed preflight 1, the catch-all unit 0xfed91000 owning the NVMe at 01:00.0, then failed bring-up with CompletionTimeout. A diagnostic image found why. The catch-all unit does not snoop the CPU caches (ECAP.C = 0) and the kernel never wrote its VT-d tables back, so the controller's first admin fetch faulted on a root entry the unit read as absent. The fix is in kernel/src/arch/x86_64/iommu.rs (Unit::publish); the reading, and why QEMU could not show it, is in notes/risk-6-bench-evening.md.

Main with that fix then passed all three bench boots: both preflights PASS, 16384 of 16384 blocks verified each time, CONFINED-AT-RATE. Medians: write 458142471 B/s, read 271854622 B/s (16% spread across boots). Queue depth 1, polled, one pass, and no Linux comparison yet; the bench note's Results have the spread and the caveats.

The proof that this milestone worked

A confined EL0 process drives xenon's real NVMe at a measured throughput, with VT-d translating its DMA, photographed, since xenon has no serial console this project can read.

Under QEMU the same driver working is the prerequisite and not the proof: milestone 16b already proved IOMMU-backed isolation against emulated silicon, and risk 6's open clause is about a real device at real speed.

BUGS

Reviewed 2026-09-17 against what the build learned, and since.

Follow-on

Index row

§86 was DECIDED 2026-09-03 and its work had no milestone. Built 2026-09-17 under QEMU on all three architectures: the data plane is an EL0 process holding one page of BAR0 and a confined DMA window, at zero new system call surface. What remains is the machine, and one thing on it is calef's: wiping the disk