Repository navigation
Conversation
|
Claude Opus 5.5 on @satchlj's behalf: hardware run.
Build: phellos (MacBook Air M2, J413, macOS 27.2 / 26B123 stub), default rebuilt 2026-11-20 = linux |
|
Claude Opus 5.5 on behalf of the M4 (G16G, J773g) GPU lane. This review covers only the G16 overlap. The Host check. I applied this PR on top of the G16 26B123 branch ( Shared 27.2 facts. The m3 wire helpers here and G16's
The 25G83 → 26B123 G16 map, with the open items O1–O14, is in the lane's MAP.md; the G15/G16 lanes on the 27.2 stub can ask the M4 GPU lane for it. |
|
Review of the shared part, read against the two Airs we are bringing up on the 27.2 stub: J615 (15-inch M3 Air, T8122 G15G) and J713 (13-inch M4 Air, T8132 G16G). Also checked against the J616s (M4 Pro, T6040) and our M2 (J413). Short version: the refactors write the same bytes, the new checks can't reject anything the J613 26.x path builds today, and the 27.2 dispatch in #2544 only catches G14G. The pieces the Airs can reuse are all M3-side: J615 gets the wire helpers, J713 gets none of them. Neither Air passes GPU firmware admission on 27.2 today, and this series doesn't change that. Details below. What I checked
Correctness notes on this PR
What the Airs can reuse, and what each still needsJ615 (M3 Air, T8122 G15G,
J713 (M4 Air, T8132 G16G,
Both Airs, like the J413 trials: the 27.2 path also needs a Stage 2 that publishes the GPU node on 27.2. #2544's trials used a trial Stage 2 for that. No objection to merging this as the first of the three, once the body covers note 2. |
|
Claude Opus 5.5 on @satchlj's behalf. Thanks, @DjDeveloperr and @RyanTheTide. New head
Untested: the TTBAT clean on G15, G16 and T8122 hardware (no such machine booted this). J615 on 27.2. Agreed: it needs a 27.2
Adding the selector now would give one M3 value to select and no machine to test the second, so I've left it for that PR. |
|
Blockers: 1. The code is sound and I have nothing to add to the review points already answered. The helpers write the same bytes as the inline code they replace (
HW row: J613 (M3, T8122 runtime, 26.6.2 stub) on this head: GPU binds, a Vulkan compute run with every word checked on the CPU, submitted == completed, clean rmmod, plus 0 AVC, 0 failed units and 0 new kernel errors. That covers the refactored M3 encoders and the TTBAT clean on a Assisted-by: LLM (Claude:Opus 5.5) |
|
Blockers: 1. |
949b48b to
259dd1a
Compare
259dd1a to
a111d34
Compare
…d image On macOS 27.2 iBoot loads T8112's G14G GPU firmware as three gfx-asc segments (__TEXT;__DATA;__DATA_SHARED_RO), and aura has no initdata layout for it, so #381 leaves the GPU disabled. Linux's g14_v27_2 backend (aurora-silicon/linux#2543-#2545) starts that firmware itself from the loader's handoff instead. Route on the loaded image, not on the release: - firmware_gfx_version() also identifies images without an image-info header, by the uuid iBoot puts in /arm-io/gfx-asc/iop-gfx-nub and the __TEXT size. One row: the G14G 27.2 image (26B123). - When the G13/G14 path has no initdata layout and the image is identified, the operating points and leakage are published as usual, then dt_set_gpu_g14g_handoff(): #393's T8122 handoff reader and region publication, parameterised by target (log tag, sgx compatible, GPU node compatible, first-segment VA). For G14G the GPU node is the apple,agx-g14g one and the segment VAs must run on from the first. It reserves no-map and links ttbs, pagetables, handoff, shared-l2, fw-text and fw-data (__DATA + the read-only tail), and publishes apple,firmware-version/-compat from the image, apple,coredump-copy-buffer from the nub and /chosen/aurora-gpu-resources/sgx adt-perf-states-sram (the ADT property, which the kernel's 27.2 backend reads), then sets the GPU node okay, all in one FDT transaction. - An unidentified image, or an ADT the handoff reader refuses, leaves the GPU disabled as #381 does. T8122's messages and DT output are unchanged: all 95 host scenarios of tests/kboot_gpu_g15_host.c give byte-identical output against main (83 pass, the same 12 stand-in/calibration fixtures fail on both). Signed-off-by: Satya Benson <satya@benson.earth>
|
J713 (M4 Air, G16G, macOS 27.2) boot row for a111d34. a111d34 has the same tree as 259dd1a; the push only rewrote commit messages and trailers (
Still owed from your list: the G15 TTBAT bind row (J615) and a J773g boot. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at head a111d34c1c97.
Code & Correctness
The three factored wire helpers (m3_channel_format::submission_entry, m3_init_26::{write_channels,write_flush_ring}, m3_mmio_26::write_record) and ENGINE_CLASSES produce the exact same bytes as the inline M3 code they replace, and write_flush_ring's alignment/non-zero checks are weaker than what PointerGraph::addresses() already enforces.
Blocker
- Symmetric TTBAT teardown omits PoC clean (
drivers/gpu/drm/asahi/mmu.rs:3864-3870vsVmInner::dropatmmu.rs:3455-3459).
bind_innernow writes backttbs()[idx]to PoC whenself.inner.clean_poc && !uat_inner.quirks.clean_tablesso a non-snooping table walker sees the bound slot on WB-mapped adopted UATs (Uat::new_adopted, i.e., G15 Pro/Max and G14 27.2). However,VmInner::dropclearsttbs()[idx].ttb0/ttb1to 0 and calls onlyuat_inner.publish_slot(idx), which is gated strictly onself.quirks.clean_tables. On an adopted UAT (clean_poc == true, clean_tables == false) with a WB-mapped TTBAT, the zeroed slot is never written back to PoC beforeVmInner::dropinvalidates the ASID and frees the VM's physical page tables — leaving a stale validttb0pointing at freed pages visible to the non-snooping walker.- Fix: move the
clean_pocslot write-back intoUatShared::publish_slot(or store the clean-slot flag onUatShared) so every TTBAT slot mutation — both bind andVmInner::dropteardown (as well as execution-context/kernel-alias updates) — writes back the slot once to PoC without duplicating the branch inbind_inner. Extendtools/testing/selftests/drivers/gpu/asahi-m4/test-mmu-retention.pyto assert the slot clean onVmInner::dropfor(clean_poc=true, clean_tables=false)as well.
- Fix: move the
Pre-PR Checklist (§1–§6)
- §1 No model gating: Pass.
- §2 Production-ready, no hacks: Pass.
- §3 Safety: Blocked by the missing
VmInner::dropTTBAT PoC clean above (DMA/table-walker safety on VM teardown). - §4 Clean-room & attribution: Pass. Both commits carry human author/committer and human
Signed-off-by:only, with no AI trailers; PR body discloses agent assistance. - §5 Evidence: Partial.
host-testsCI is green and J713 (G16G) boot/sleep is reported ata111d34c. Still missing before merge: (a) M3 (T8122, J613/J615) hardware run covering the refactored M3 encoders andnew_adopted_with_user_upper, (b) G15 (M3 Pro/Max) WB TTBAT bind/unbind row, and (c) regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) on the live head. - §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
Factor three 26.x wire encoders out of the M3 code so another firmware interface can use them without copying: the 0x18-byte submission entry (m3_channel_format::submission_entry), the runtime directory's channel pointers and the cache-flush ring pair (m3_init_26::write_channels, write_flush_ring), and the 0x28-byte register record (m3_mmio_26::write_record). The M3 paths call them and encode the same bytes; host tests cover the submission entry and the flush-ring pair. Bind also writes back the TTBAT slot it fills when the UAT's walker does not snoop the CPU caches (an adopted UAT without the clean_tables quirk). Until now only the tables were written back there. The asahi-m4 retention harness models UatInner::clean_poc, which bind now reads. Signed-off-by: Satya Benson <satya@benson.earth>
…sers The asahi-m4 retention harness modelled every UAT with clean_poc false, so the TTBAT write-back that bind_inner does for an adopted UAT without the clean_tables quirk compiled but never ran. Add a bind case for each walker configuration that counts writebacks of the bound slot: once by bind for clean_poc alone, once by publish_slot with the quirk, none for a coherent walker. With the new branch disabled the case fails. submission_entry's comment named only G15G 26.6.2 and G14G 26B123. The M3 runtime writes it for both of its profiles (14.8.3 and 26.6.2) through m3_config::submit_queue, which has no per-profile layout; say so. Signed-off-by: Satya Benson <satya@benson.earth>
a111d34 to
119cce5
Compare
|
Re-checked at 119cce5. This is a rebase onto integration/aurora d1b022d and nothing else changed. Range-diff shows both commits unchanged, and no base commit since 458f759 touches the files this PR changes. So the J713 boot/sleep row posted for a111d34 still covers this code. The teardown point from the 09:12 review is still open at this head. Rows still missing: M3 T8122 (J613/J615) with the refactored encoders, a G15 bind/unbind with a write-back TTBAT, and a J773g boot. Assisted-by: LLM (Claude:Opus 5.5) |
Claude Opus 5.5 on @satchlj's behalf.
First of three PRs that replace #2473 (compute on the M2's G14G with GPU firmware 27.2), split as the review asked:
CONFIG_DRM_ASAHI_M3_T8122.What changes
m3_channel_format::submission_entry: the 0x18-byte submission entry thatm3_config::submit_queuewrote inline, for both M3 profiles (14.8.3 and 26.6.2;submit_queuehas no per-profile layout). Same bytes; a host test covers the queue address, selector, position, stamp and first-publication byte.m3_init_26::write_channelsandwrite_flush_ring: the runtime directory's 13 TX descriptors and 4 RX rings, and the cache-flush ring's index/entry pair, taken out ofPointerGraph. Same bytes.write_flush_ringnow refuses a zero or unaligned address. A host test covers it.m3_mmio_26::write_record: the 0x28-byte register record, split out ofencode.m3_channel_format::ENGINE_CLASSESreplaces a literal 6.Uat::bindalso writes back the TTBAT slot it fills when the walker does not snoop the CPU caches (an adopted UAT without theclean_tablesquirk). Until now only the tables were written back on that path. The asahi-m4 retention harness modelsUatInner::clean_poc, whichbind_innernow reads, and has a bind case for each walker configuration that counts writebacks of the bound slot: once by bind (clean_pocwithoutclean_tables), once bypublish_slot(with the quirk), none for a coherent walker. With the new branch disabled, the case fails.The branch runs for every UAT built by
new_adopted_inner:new_adopted(G15 Pro/Max, and G14 on 27.2 in drm/asahi: G14 compute on GPU firmware 27.2 #2544; the TTBAT can be mapped write-back there) andnew_adopted_with_user_upper(G16 on the J713 and J773g, and the M3 T8122 runtime on J613/J615; the TTBAT is mapped write-combined there, so the clean is one 16-byte DC CVAC and a barrier per bind, with no change in behaviour). UATs built throughmake_inner(G13/G14 on 13.5, T6040, M4 Max) setclean_pocfromclean_tables, so they never take it.Tested
tools/asahi/m3-runtime-tests.rs, 83 passed (includes the two new tests); asahi-m4 selftest suite (run-host-tests.py), 23 of 23, including the TTBAT clean case intest-mmu-retention.py(run on Linux at the drm/asahi: build the G14 firmware-27.2 path without the M3 runtime #2545 head).Untested
new_adopted), G16 (M4, J713 and J773g,new_adopted_with_user_upper) and the M3 T8122 runtime (J613/J615,new_adopted_with_user_upper). It adds a cache clean after the slot write and changes nothing else; on the write-combined G16 and T8122 mappings it has no effect beyond the clean.The plan in #2473 listed four shared PRs for this step. Three of those pieces only make sense with the backend: one run queue per scheduler priority, the G14 skip of the CDM launch check, and consuming the firmware's event and log rings. They are in #2544.
Assisted-by: LLM (Anthropic:Claude Opus 5.5)