Repository navigation
irqchip/apple-aic: treat T8132 VM_TMR_FIQ_ENA_EL2 as read-only without a CTXR window - #2666
Conversation
|
Thanks for the clear report. Making T8132 follow the T8142 policy for One request: the Assisted-by: LLM (Claude:Opus 5.5) |
|
I tested it on the J715. The Build: this PR with
Result:
So only the timer write traps here. I'll reduce this PR to the one line |
d5a91c5 to
6c49ab1
Compare
|
Re-review of 6c49ab1: No blockers.
Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Adversarial review at 6c49ab136eb76d7350b9b6240cefc723995a5262: 0 code/policy/attribution blockers (CI host-tests: pass; mergeable/clean). Holding only for missing §5 hardware verification rows.
Checklist audit (§1–§6)
- Code (
drivers/irqchip/irq-apple-aic.c:369): Sound. Adding.vm_timer_fiq_readonly = truetoaic3_t8132_infomatchesaic3_t8142_info. At init (irq-apple-aic.c:1335-1337),aurora,ctxr-exec-windowin/chosenclearsvm_timer_fiq_readonlyback tofalseat EL2, leaving Aura-booted T8132 machines unchanged. Without a CTXR window,aic_vm_timer_mask()masks viaSYS_CNTP_CTL_EL02/SYS_CNTV_CTL_EL02instead of trapping onSYS_IMP_APL_VM_TMR_FIQ_ENA_EL2, whileICH_HCR_EL2remains written as before (proven not to trap on J715 with IRQ 33 at 0). - §1 No model gating: Pass. Driven by the
/chosenaurora,ctxr-exec-windowproperty, not board/model/firmware checks. - §2 Production-ready: Pass. No new cmdline flags, knobs, or hacks.
- §3 Safety: Pass. Prevents early undefined-instruction oops without weakening vGIC maintenance masking.
- §4 Clean-room & attribution: Pass. Single commit
6c49ab13carries human author/committer (Kazuhide Takahashi <[email protected]>) andSigned-off-by:with no agent trailers; clean-room diff. - §6 Naming: Pass (mention of
m1n1 stage 1accurately describes the third-party stage 1 chain lacking a CTXR window, distinct fromaura). - Non-blocking nit: Comments at
irq-apple-aic.c:669and:1328still mention T8142 only (now applies to both T8132 and T8142).
Remaining §5 HW rows required before merge
- J715 (T8132, no CTXR window) at
6c49ab13on the default kernel command line (without extraearlycon=efifb,dt keep_bootcon): include the §5 regression counts (0 SELinux denials, 0 failed systemd units, 0 new kernel errors). - Aura-booted T8132 (e.g. M4 Air J713 or M4 Mac mini J773g, with
aurora,ctxr-exec-windowpresent) at6c49ab13: boot and regression run confirming the CTXR-window path clearsvm_timer_fiq_readonlyand boots with 0 SELinux denials, 0 failed units, and 0 new kernel errors.
There was a problem hiding this comment.
Formal §1–§6 review at verified live head 6c49ab136eb76d7350b9b6240cefc723995a5262 (live integration/aurora 0f111a0dc307, not superseded; live CI host-tests 1/1 green, run 44868471966).
Checklist Summary
- §1 No model gating, §2 Production-ready, §3 Safety, §4 Attribution, §6 Naming: PASS (0 code/policy/attribution/naming/CI blockers).
- Adding
.vm_timer_fiq_readonly = truetoaic3_t8132_info(drivers/irqchip/irq-apple-aic.c:369) matchesaic3_t8142_info. Inaic_of_ic_init()(:1352-1354),/chosen'saurora,ctxr-exec-windowclearsvm_timer_fiq_readonlyback tofalseat EL2, leaving Aura-booted T8132 machines unchanged while avoiding the undef-instruction oops on chains without a CTXR window.ICH_HCR_EL2handling is left intact (proven not to trap on J715 with IRQ 33 at 0). - Commit
6c49ab136eb7carries human author/committer (Kazuhide Takahashi) and humanSigned-off-by:only.
- Adding
Blockers (§5 Evidence)
- J715 (no-CTXR path) exact-head default-cmdline regression row missing: The earlier J715 boot ran on older base
0abc2f385ewith extra debug parameters (earlycon=efifb,dt keep_bootcon) and omitted §5 regression counts. Please re-run on exact live head6c49ab136eb7using the default kernel command line (no extra bootcon flags) and report0SELinux denials,0failed units, and0new kernel errors. - Aura-booted T8132 (
aurora,ctxr-exec-windowpresent) exact-head regression row missing: Please post a default-cmdline boot at6c49ab136eb7on an Aura-booted T8132 Mac (e.g. M4 Air J713 or M4 Mac mini J773g) confirmingvm_timer_fiq_readonlyis cleared cleanly with0SELinux denials,0failed units, and0new kernel errors.
Non-blocking nit
- Comments at
drivers/irqchip/irq-apple-aic.c:659and:1345still mention T8142 only (now applies to both T8132 and T8142).
…t a CTXR window On a J715 (Mac16,13) booted through a stage 1 that arms no CTXR exec window, the kernel dies before the console in aic_init_cpu(): Internal error: Oops - Undefined instruction ... pc : aic_init_cpu+0x8c (msr s3_5_c15_c1_3, x9 -- VM_TMR_FIQ_ENA_EL2) T8142 already avoids this write through vm_timer_fiq_readonly (EL02 timer masks), which is cleared when the loader publishes aurora,ctxr-exec-window. Apply the same policy to T8132, so an aura-booted T8132 is unchanged, and say in the two comments that the policy now covers T8132 as well. Tested on J715 with OS firmware 26.5 and 26.6.2 (no CTXR window): boots with all 10 CPUs. The vGIC maintenance write (ICH_HCR_EL2) does not trap there and is left as is. Signed-off-by: Kazuhide Takahashi <[email protected]>
6c49ab1 to
1a81530
Compare
|
Thanks. I've pushed 1. J715, no CTXR window: row with the change lines of This boot was made for the #2665 tip row (#2665 (comment)). It contains this PR's change, with the same lines as
2. Aura-booted T8132 with I can't produce this boot: this J715's stage 1 is the one that arms no window. I'll ask for that row in a separate comment. |
|
Request for one more row. I can't produce it here. Could someone with an aura-booted T8132 Mac boot
@RyanTheTide, @erikwb, you've posted J713 rows before. Would one of you be able to? |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH at 1a81530166e3
Blockers:
- Exact-head CI (
Host tests, run45295786722) at1a81530166e3isaction_required(fork PR awaiting maintainer approval and a green run). - §5 hardware verification: missing an exact-head (
1a81530166e3) default-cmdline boot and regression row on an aura-booted T8132 Mac with/chosen/aurora,ctxr-exec-windowpresent (e.g. J713, J773g, J604, or aura-booted J715) confirmingvm_timer_fiq_readonlyis cleared cleanly with 0 SELinux denials, 0 failed units, and 0 new kernel errors (already requested by the author).
Checked: Code, EL2/hyp register paths, and comments at 1a81530166e3 (drivers/irqchip/irq-apple-aic.c:369, :669-671, :1329-1339) are clean and mergeable against main (1b1304ff2a67); §1 no model gating, §2 production-readiness, §3 safety, §4 human-only commit attribution, and §6 commit naming all pass. No further code changes needed from the author (optional nit: sync the PR description wording with the updated commit message).
Evidence
- Head / base:
1a81530166e3e452ce1996243d818adee83cfae1(forkkazuhidet/linux:j715/aic-t8132-vm-timer-readonly) againstmain(1b1304ff2a67128b726bed27c36a7244f71c7014);mergeable: true. - Code & EL2/hyp paths (
drivers/irqchip/irq-apple-aic.c): Adding.vm_timer_fiq_readonly = truetoaic3_t8132_info(:369) matchesaic3_t8142_info(:378). Inaic_of_ic_init()(:1337-1339),/chosen/aurora,ctxr-exec-windowat EL2 clearsvm_timer_fiq_readonlyback tofalsebeforeaic_irqcis published and beforeaic_init_cpu()runs, leaving aura-booted T8132 machines unchanged. Without a CTXR window,aic_vm_timer_mask()masks viaSYS_CNTP_CTL_EL02/SYS_CNTV_CTL_EL02instead of trapping onSYS_IMP_APL_VM_TMR_FIQ_ENA_EL2, whileICH_HCR_EL2(:1071) remains untouched. Both comments (:669-671,:1329-1335) were updated to include T8132 alongside T8142; functional code is unchanged from6c49ab136eb7. - §1–§4 & §6: Property-gated (
/chosen/aurora,ctxr-exec-window), no new cmdline/module knobs, no safety regressions. Single commit1a81530166e3has human author/committer (Kazuhide Takahashi <[email protected]>) and humanSigned-off-by:, with zero AI attribution in commit, PR title, or PR body. Commit message removed the legacy loader name; PR body still references the third-party stage 1 chain. - §5 CI & hardware evidence:
- CI:
Host testsrun45295786722at1a81530166e3isaction_required(fork PR, not yet approved/run). - J715 (T8132, no CTXR window): tested with the identical functional change on tip
integration/aurorab10280c04c2d(+#2665,#2672) withoutearlycon/keep_bootcon(desktop up, 0 new kernel errors, 2 pre-existing local failed units, SELinux N/A; earlier boot also confirmed 10/10 CPUs online and IRQ 33 = 0). - Aura-booted T8132 (
aurora,ctxr-exec-windowpresent): pending maintainer/tester run at1a81530166e3.
- CI:
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 1a81530166e3: the code is ready; it needs only a row at this head.
Blockers: none in the code. Missing row: your J715 row covers the no-CTXR path. Still needed, as you asked: one aura-booted T8132 with aurora,ctxr-exec-window in /chosen (a J713, the J773g or a J604) at this head, with the VM timer FIQ working and no AIC warnings. The M4 mini lead can run it on the J773g.
Because the AIC is shared by every Mac, it also needs one boot at this head on a non-M4 Mac with no AIC warnings before it merges.
Checked: no Apple material. 1a815301 changes only comments. The register is treated as read-only only when there's no CTXR window.
Superseded by the review at 1a81530
|
Row at Kernel: main 42d693c + this PR + #2672 (both merge cleanly), on the default fleet command line.
Not covered: the no-window path this PR fixes. That's your J715 on 26.5/26.6.2, and there's no such boot in our lab. |
|
Why not just update your boot object to latest and have the CTXR window? |
|
|
What: on a T8132 booted without a CTXR exec window, the
VM_TMR_FIQ_ENA_EL2write inaic_init_cpu()is an undefined instruction and the kernel dies before the console. Treat it as read-only there, as T8142 already does.Tested: J715 M4 Air (no CTXR window) with the code of
6c49ab136eb7, which is the same as at1a815301(that commit changes only comments): boots to the desktop with all 10 CPUs.Risk: two-way · M4 (T8132) Macs; unchanged where aura publishes
aurora,ctxr-exec-windowNot yet: an aura-booted T8132 with
aurora,ctxr-exec-windowpresent (J713, J604 or J773g); KVM guest timers.On a J715 (Mac16,13) booted through a stage 1 that arms no CTXR exec
window, the kernel dies before the console in aic_init_cpu():
Internal error: Oops - Undefined instruction ... pc : aic_init_cpu+0x8c
(msr s3_5_c15_c1_3, x9 -- VM_TMR_FIQ_ENA_EL2)
T8142 already avoids this write through vm_timer_fiq_readonly (EL02 timer
masks), which is cleared when the loader publishes
aurora,ctxr-exec-window. Apply the same policy to T8132, so an
aura-booted T8132 is unchanged, and say in the two comments that the
policy now covers T8132 as well.
Tested on J715 with OS firmware 26.5 and 26.6.2 (no CTXR window): boots
with all 10 CPUs. The vGIC maintenance write (ICH_HCR_EL2) does not trap
there and is left as is.
Reduced to one line after the J715 test in the comment below: the
ICH_HCR_EL2write does not trap.1a81530166e3changes only the two comments; the code is the same as6c49ab136eb7. Built and tested onintegration/aurora0abc2f3; the change applies unchanged to the current tip. J715 report: #2663.