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_read_qemu_2026-09-25.md

66 lines · 3078 bytes Raw Blame History Rendered
1# P3 native NVMe read substrate: QEMU qualification (2026-09-25)
2
3Result: **`QEMU_NVME: PASS`** in both SMMU-confined and fail-closed modes.
4
5This is an emulator qualification only. It is not Machine 1 evidence. The
6substrate issues Identify and Read commands only; write and flush are not
7claimed, implemented, or exercised.
8
9Baseline: `aien-dev/aienos` @ `ff5de9c` plus this branch. Command:
10`bash scripts/qemu_nvme_test.sh` (SMMU mode) and
11`AIENOS_QEMU_SMMU=0 bash scripts/qemu_nvme_test.sh` (fail-closed mode).
12
13## Disposable media
14
15- 64 MiB raw image, 131072 LBAs of 512 bytes, rebuilt per run.
16- Sentinel at LBA 2048, one 512-byte block: the 16-byte magic
17 `AIENOS-NVME-SENT` repeated 32 times.
18- Sentinel SHA-256:
19 `8b688adcb13bef657e868313fb149e7e92e664b5f09fbd32f99d9cabf756fdf1`.
20- Attached as `-drive if=none,id=nvme0,... -device nvme,drive=nvme0,serial=aienos-nvme-test`.
21
22## SMMU-confined run (`-M virt,...,iommu=smmuv3`)
23
24```text
25NVME_DISCOVERY_QEMU: PASS (class=0x0108 seg=0000 bus=00 device=02 function=00 bar0=0x8000004000)
26smmu: enabled base=0x9050000 stream_id=0x10
27smmu_dma_window: nvme only, translation active
28dma_gate: nvme granted (Confined), bus master on
29NVME_IDENTIFY_QEMU: PASS (vid=0x1b36 did=0x0010 nsid=1)
30NVME_GEOMETRY_QEMU: PASS (nsid=1 block_count=131072 block_size=512)
31NVME_READ_QEMU: PASS (lba=2048 blocks=1 bytes=512 sha256=8b688adcb13bef657e868313fb149e7e92e664b5f09fbd32f99d9cabf756fdf1)
32NVME_BOUNDS_QEMU: PASS (lba=131072 rejected OutOfRange no_command)
33NVME_ERROR_QEMU: PASS (identify nsid=0xffffffff rejected status=nonzero sct=0 sc=11)
34dma_gate: nvme bus master revoked
35QEMU_NVME: PASS (smmu)
36```
37
38The read SHA-256 the kernel computes natively equals the host-computed
39sentinel SHA-256, so a wrong or stale image cannot pass.
40
41## Fail-closed run (no SMMU, normal build)
42
43```text
44NVME_DISCOVERY_QEMU: PASS (class=0x0108 seg=0000 bus=00 device=02 function=00 bar0=0x8000004000)
45dma_sweep: seg 0000 bus 00-ff functions=3 bridges=0 bridges_bme=0 endpoints_bme_found=2 still_enabled=0
46dma_gate: nvme denied (NoSmmu), bus master stays off
47nvme: unavailable (SMMU DMA isolation not active)
48QEMU_NVME: PASS (fail-closed)
49```
50
51`NVME_IDENTIFY_QEMU` and `NVME_READ_QEMU` are absent. Discovery runs before the
52DMA gate and is DMA-free; the controller is never enabled and no read happens.
53This proves the M3 rule holds for the NVMe path: no SMMU confinement means no
54DMA.
55
56## What this proves and does not prove
57
58- Proves, in QEMU: ECAM discovery of an NVMe class device, controller reset and
59 ready handshake, Identify Controller and Namespace, polled I/O queues, a
60 one-LBA read over PRPs, client-side bounds rejection, and device error
61 surfacing, all with DMA confined to the driver's arena by the SMMU.
62- Does not prove: any GB10 or Machine 1 behavior, GPU/accelerator behavior,
63 write, flush, namespace management, format, interrupt-driven I/O, or Store
64 interaction. It makes no Store v1 dependency and touches no Store file.
65- The unsafe bypass feature exists for debugging only; no bypass run was needed
66 for this qualification.