interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / evidence / p3_nvme_write_flush_qemu_2026-09-25.md

83 lines · 3826 bytes Raw Blame History Rendered
1# P3 native NVMe write + flush durability qualification (2026-09-25)
2
3Result: **`QEMU_NVME_RW: PASS`** in SMMU-confined and fail-closed modes.
4
5Emulator qualification only. It is not Machine 1 evidence and does not touch
6Store. QEMU disposable media only; the drive is a fresh raw file rebuilt each
7run.
8
9Base: `aien-dev/aienos` @ `ef359ec` plus this branch. Commands:
10`bash scripts/qemu_nvme_rw_test.sh` (SMMU) and
11`AIENOS_QEMU_SMMU=0 bash scripts/qemu_nvme_rw_test.sh` (fail-closed).
12
13## Media and payloads
14
15- 64 MiB raw image, 131072 LBAs of 512 bytes.
16- Read sentinel at LBA 2048: `AIENOS-NVME-SENT` x32,
17 sha256 `8b688adcb13bef657e868313fb149e7e92e664b5f09fbd32f99d9cabf756fdf1`.
18- Write target at LBA 4096, seeded OLD (`AIENOS-NVME-OLD0` x32), written NEW
19 (`AIENOS-NVME-RW01` x32),
20 sha256 `76fa34c132173497a7bcd0c9618ebdcf0629f550934c164adf81cfa05e6a4451`.
21- Bounds write at LBA 131072 (== block_count); error write at NSID `0xffffffff`.
22
23## Boot 1 (SMMU confined): write, flush, read-back
24
25```text
26NVME_DISCOVERY_QEMU: PASS (class=0x0108 seg=0000 bus=00 device=02 function=00 bar0=0x8000004000)
27smmu: enabled base=0x9050000 stream_id=0x10
28smmu_dma_window: nvme only, translation active
29dma_gate: nvme granted (Confined), bus master on
30NVME_IDENTIFY_QEMU: PASS (vid=0x1b36 did=0x0010 nsid=1)
31NVME_GEOMETRY_QEMU: PASS (nsid=1 block_count=131072 block_size=512)
32NVME_READ_QEMU: PASS (lba=2048 blocks=1 bytes=512 sha256=8b688adcb13bef657e868313fb149e7e92e664b5f09fbd32f99d9cabf756fdf1)
33NVME_BOUNDS_QEMU: PASS (lba=131072 rejected OutOfRange no_command)
34NVME_ERROR_QEMU: PASS (identify nsid=0xffffffff rejected status=nonzero sct=0 sc=11)
35NVME_WRITE_BOUNDS_QEMU: PASS (lba=131072 rejected OutOfRange no_command)
36NVME_WRITE_QEMU: PASS (lba=4096 blocks=1 bytes=512 sha256=76fa34c132173497a7bcd0c9618ebdcf0629f550934c164adf81cfa05e6a4451)
37NVME_FLUSH_QEMU: PASS (nsid=1)
38NVME_DURABILITY_QEMU: PASS (lba=4096 blocks=1 bytes=512 sha256=76fa34c132173497a7bcd0c9618ebdcf0629f550934c164adf81cfa05e6a4451)
39NVME_WRITE_ERROR_QEMU: PASS (write nsid=0xffffffff rejected status=nonzero)
40dma_gate: nvme bus master revoked
41QEMU_NVME_RW: PASS (smmu)
42```
43
44Host check after the guest stopped: reading LBA 4096 from the image file
45returns the written bytes, sha256
46`76fa34c132173497a7bcd0c9618ebdcf0629f550934c164adf81cfa05e6a4451` (power-off
47persistence).
48
49## Boot 2 (same image, restart): persisted read
50
51```text
52NVME_READ_QEMU: PASS (lba=2048 ... sha256=8b688adc...)
53NVME_DURABILITY_QEMU: PASS (persisted lba=4096 blocks=1 bytes=512 sha256=76fa34c1...)
54dma_gate: nvme bus master revoked
55```
56
57`persisted` means the phase read the target before writing and found the bytes
58an earlier boot wrote, so the data survived the restart and the host-visible
59media. The harness requires this marker on boot 2.
60
61## Fail-closed (no SMMU, normal build)
62
63```text
64NVME_DISCOVERY_QEMU: PASS (...)
65dma_gate: nvme denied (NoSmmu), bus master stays off
66nvme: unavailable (SMMU DMA isolation not active)
67QEMU_NVME_RW: PASS (fail-closed)
68```
69
70`NVME_WRITE_QEMU`, `NVME_FLUSH_QEMU`, and `NVME_DURABILITY_QEMU` are absent.
71No SMMU confinement means no DMA, so no write reaches the device.
72
73## What this proves and does not prove
74
75- Proves, in QEMU: native NVMe write command construction and completion,
76 a real NVMe Flush (opcode 0, no-op prohibited), flush-gated durability,
77 client-side write bounds, an invalid-namespace write error surfaced as a
78 device error, host-visible persistence after power off, and native read-back
79 after restart, all with DMA confined by the SMMU to the driver arena.
80- Does not prove: any Machine 1 or GB10 behavior, Store behavior, multi-queue
81 I/O, FUA, or power-loss atomicity beyond a completed Flush. It makes no
82 Store v1 dependency and touches no Store file. No media is written outside
83 the disposable QEMU image.