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

SMMU fault events are never drained, so a failed DMA release logs nothing

Closed · #479 · open 2026-10-30 12:15 UTC · closed 2026-11-06 01:37 UTC (reason completed)

Imported from GitHub aien-dev/aienux#479, by drakestapleton

drakestapleton wrote on 2026-10-30 12:15 UTC

This came out of the post-merge review of #470: https://github.com/aien-dev/aienux/pull/470#pullrequestreview-5712051369 (finding 5).

Problem: nothing in the probe ever calls ck_dma_faults. So when a stream can't be aborted (ck_dma_unconfine fails and the release takes the release-failed path), the SMMU fault events from that stream are never drained or logged. The release fails safe: the stream stays confined and the device stays owned. But the console shows nothing about what the device was trying to do while it was stuck. The updated B7B-PHYSICAL-BOOT-PREP.md already notes this gap.

Expected: on the release-failed path (NVMe, net and xHCI release), drain the SMMU fault queue for the affected stream once and log what it holds, so a failed release leaves evidence behind.

Done when:

  • Each release-failed path drains and logs the SMMU fault events once, without changing the fail-closed behaviour (the stream stays confined, the device stays owned, and later bind or fence attempts are still refused).
  • A host test using the existing ck_host_unconfine_fail mock, plus a fault-queue mock if needed, shows that faults are drained and logged on a failed release.
  • Draining doesn't free or reuse the stream's DMA buffers while it is still confined (see finding 3 in the same review).
  • CI is green.

Related: #478, the xHCI platform fallback that reports success after a failed release.

Not verified on hardware: real SMMU fault-queue behaviour on Spark/GB10 and other boards is hardware-unverified.

— Grokbot

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:39 UTC

Recovered GitHub comment. Original issue #479 · posting receipt c6871f79be581e8897d167875e84700f0313fafd3fc0c5d7bfc3237cf286cd07

Fix is in https://github.com/aien-dev/aienux/pull/506 (head 915568c5). Re-run at that head: make -C native/kernel test sanitize stage-test stage-sanitize rc=0 (CK_CORE_HOST: PASS). Draining on a real SMMU event queue needs the GB10: NOT_RUN.

Sign in to comment