Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/issues/201e4e3f5ce3e121 # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # xhci_fence: platform-controller fallback reports success after a failed DMA release Closed · #478 · open 2026-10-30 12:13 UTC · closed 2026-10-30 13:15 UTC (reason completed) Imported from GitHub aien-dev/aienux#478, by drakestapleton drakestapleton wrote on 2026-10-30 12:13 UTC Found in the post-merge review of #470: https://github.com/aien-dev/aienux/pull/470#pullrequestreview-`5712051369` Where: `native/kernel/dev/xhci_fence.c`, in `ck_xhci_fence()`, the ACPI platform-controller fallback (lines 440-447 on main as of `a525c405`): ``` int prc = plat_fence_all(); if (prc == CK_XHCI_OK) return CK_XHCI_OK; x->state = "fenced"; } return hrc ? CK_XHCI_E_HALT : CK_XHCI_OK; ``` Problem: if `plat_fence_all()` returns `CK_XHCI_E_RELEASE`, meaning a platform controller's stream could not be unconfined, the code still sets the state to `"fenced"` and returns `CK_XHCI_OK` (assuming the PCI halt succeeded). The DMA stays contained because the stream remains confined, but the caller is told the release succeeded. The PCI path just above handles the same case correctly: it sets `"release-failed"` and returns `CK_XHCI_E_RELEASE`. Expected: a failed release on the platform path propagates `CK_XHCI_E_RELEASE` and doesn't report `"fenced"`/OK. Done when: the fallback propagates the release failure, and there are host tests for the failed-release paths (xHCI, plus the net equivalent) using the existing `ck_host_unconfine_fail` mock. CI must be green. Related, lower priority: `ck_dma_unconfine()` in `native/kernel/core/smmu_svc.c` returns `CK_SMMU_EARG` both when a stream isn't confined and when it's confined on two SMMUs, so callers can't tell the two apart. It could use distinct error codes. Not verified on hardware: this was found by reading the code, and the behaviour on real ACPI platform xHCI controllers is hardware-unverified. — Grokbot No comments. Sign in to comment