What the review read and ran
An appendix to the milestone.
The crate
partsfoundry/non_volatile_memory_express at 60b34280ecbba250ea4272984c5bcb3afe908e57, version
0.1.0-pre.4, edition 2024, rust-version 1.85, no dependencies and no features. Read:
Cargo.toml, README.md, CHANGELOG.md, examples/software_controller.rs, and every module
under src/ for its public items (lib, capabilities, command, command_identifier_set,
completion, configuration, doorbell, identify, namespace, physical_region_page,
queues and registers). The review listed src/verification.rs, examples/qemu_driver.rs,
falsifications/, fuzz/ and docs/ without reading them.
The commands
Every command ran in a copy of the clone with its target directory elsewhere, so the clone stayed clean. The host is Linux x86_64 with rustc 1.100.0.
cargo buildpasses.cargo test: 57 unit tests, the example's 1 test, 13 doctests and 1compile_faildoctest pass.cargo +1.85 test, the declared minimum: the same counts pass.cargo doc --no-deps, and again withRUSTDOCFLAGS="-D warnings": both pass.cargo clippy --all-targetspasses with no warning.- The bare-target builds pass for
x86_64-unknown-none,riscv64imac-unknown-none-elfandaarch64-unknown-none-softfloat. cargo run --example software_controllerprints twelve reported heads and one refusal.cargo build --example qemu_driverpasses; the example was not run.cargo package --list --allow-dirtylists 41 files: the source, the two examples, the eighteen falsification patches, the README, the changelog and the licenses.docs/is not among them (P2-7).grep -rn '# Errors' src,grep -rn must_use srcandgrep -rn 'forbid\|deny(' srceach print nothing (P1-2, P1-3, P1-4).grep -rn '# Panics' srcfinds seven headings.- The crate has no features, so there is no feature combination to build.
A probe crate, depending on the copy by path, printed the following.
doorbell(u16::MAX, Doorbell::CompletionHead, 15)is0x3fffe1000, and a stride exponent of 16 gives the offsets of 0 (P0-6).- A
SubmissionQueueassigned to a second binding and pushed there leaves the first one's tail at 0, andsize_of::<CommandIdentifierSet<1024>>()is 8,192 (P0-3). physical_region_page_pair(0x4000_0800, 4096, 16384)returns one pointer and a zero second entry (P0-1).physical_region_page_pair(0, (1 << 63) + 1, 1 << 63)panics with an overflowing multiply in a debug build and returnsNonein a release build (P0-1).Command::readwith a count of zero panics (P1-2).
The comparators read
The review downloaded each comparator's .crate at the version the prior-art table gives, into
a directory of its own. It measured through the crates.io API on 2026-11-26 (UTC) as
release-review-lane. Searches by the keyword nvme and by name found the rows of the table
and no other driver. crates.io has no crate named nvme-rs, nvme-core, nvme-types,
nvme-spec, nvme-device, nvmed, embedded-nvme, simple-nvme or nvme-oxide.
nvme-driver0.8.2:Nvme,Config,NamespaceandNvmeBlockDriverare the public surface (src/lib.rs), overdma-api,mmio-api,mbarrier,rdif-block,tock-registersandlog.NvmeReg(src/registers.rs) is aregister_structs!block;begin_enablechecks the page size against the capabilities once, andwrite_sq_y_tail_doolbellcomputes the doorbell pointer and writes it.CompleteQueue::complete(src/queue.rs) issuesrmb, reads the whole entry and then tests the phase;NvmeCompletion::sq_headis declared and never read; itsresultis au64.Identify::parseimplementations (src/command.rs) cast the byte slice to*const u32and to a#[repr(C)]struct insideunsafe.Error(src/err.rs) hasDisplayandcore::error::Errorand anUnknown(&'static str)variant with 21 call sites. The I/O queue (src/block/io_queue.rs) keeps a free list of command identifiers and one list page per command.tunnr-nvme0.1.1: astddriver over VFIO withlibcas its one dependency.Bar(src/bar.rs) hasread32,write32,read64andwrite64at ausizeoffset;Mapper(src/memory.rs) hasmapandunmap.spec.rshas the register offsets asusizeconstants,sq_doorbellandcq_doorbelltaking a stride in bytes, aStatusstruct, the Identify parses andprp_pages, which returns(u64, Vec<u64>).cmd.rshasNvmeCommand, a#[repr(C, packed)]struct with public fields, and over a dozen builders, among themset_num_queues,write_zeroes,io_write_fuaand the two queue deletions.QueuePair(src/queues.rs) reads dword 3, tests the phase, fences and then reads the entry, and recordssq_head % depth.fake.rs, under thefakefeature, exportsFakeNvmeandFakeMapper.Error(src/lib.rs) has fiveStringvariants.nvme0.0.0: the API reports six versions, 0.1.0 to 0.2.2, all yanked, so no source was read.nvme-cli-sys1.0.0: generated bindings (src/bindings.rs) to Linux's ioctl structures, with no driver logic; a neighbor.libnvme0.9.0: bindings to a Linux C library, host only; measured, and its source listed but not read.vroom0.1.0 on crates.io describes itself as Vim macros from the shell. The measurement that set the order took it for the NVMe driver of that name; it is not.
The systems outside Rust
- Linux v6.12,
drivers/nvme/host/pci.c,drivers/nvme/host/core.candinclude/linux/nvme.h, fetched from the tagged tree.nvme_cqe_pendingreads the status word alone and tests the phase, andnvme_poll_cqissuesdma_rmbbeforenvme_handle_cqereads the rest.nvme_handle_cqelooks the command identifier up in the tag set and warns on an unknown one; it passessq_headto a trace point and nowhere else.nvme_write_sq_dbwritesdbs[qid * 2 * db_stride]and skips writes while a batch is open.struct nvme_completionholds a 64-bit result union, and every multi-byte field is a__letype.NVME_PCI_MAX_QUEUE_SIZEis 4095 andio_queue_depthdefaults to 1024.nvme_set_queue_countruns before the driver creates an I/O queue. GPL; read for its interface shape only.
The benchmark
A scratch crate depending on the crate's copy by path and on tunnr-nvme = "=0.1.1", built with
cargo build --release and run three times. Each row starts at 64 repeats and doubles until a
pass lasts 50 ms, then runs seven passes and reports the lowest divided by the repeats, with
black_box on every input and result.
- Pointers for 4 KiB:
physical_region_page_pair(0x4000_0800, 4096, 4096)againstspec::prp_pageswith the same arguments followed byspec::prp_fields. - Pointers and list for 128 KiB:
physical_region_page_list(0x4000_0800, 131072, 4096, list, 0x9000)into a[u64; 512], againstspec::prp_pagesfollowed by the copy of each entry into a byte page withto_le_bytes, asQueuePair::pushdoes, andspec::prp_fields. - One Read command:
Command::readagainstcmd::NvmeCommand::io_read, same fields. - One whole round, the crate alone:
CommandIdentifierSet::<1>::acquire,Namespace::transfer_command,SubmissionQueue::pushon a 64-entry ring, a copy of the command into aVecof slots, then a completion built for that command and passed throughis_phase_tag_set,from_dwords,is_owned,release,record_headandpop.
What was not run
- No whole-round comparator ran:
tunnr-nvme'sQueuePairmethods are private and reach memory through itsMapper, andnvme-driverneeds a mapped register block and its DMA domain. - No device and no QEMU run: the benchmark measures arithmetic against host memory.
- Kani, mutation testing and the fuzz targets were not run.
- SPDK and the Redox driver were not read.