Repository navigation
irqchip/apple-aic: mask t6041 guest timers through EL02 controls - #430
Closed
jgoyvaerts wants to merge 1 commit into
Closed
jgoyvaerts wants to merge 1 commit into
jgoyvaerts wants to merge 1 commit into
Conversation
With KVM enabled on the T6040 (M4 Pro), a muvm/libkrun guest never boots: vCPU 0 sits at 100% on one guest PC, and the host "kvm guest vtimer" IRQ fires about 1.3M times a second on that core. kvm_exit traces show back-to-back IRQ exits roughly every 8us with almost no timer state updates. The T6040's AIC matches the generic "apple,t8122-aic3" entry, so the driver masks the guest timers by writing VM_TMR_FIQ_ENA_EL2. On this SoC that write has no effect (it is silently ignored; T8142 traps it), so the guest vtimer FIQ is never masked and storms. Give "apple,t6041-aic3", the first compatible in t6040.dtsi, the T8142 info, so the guest timers are masked through CNTP/CNTV_CTL_EL02 IMASK instead. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Contributor
Author
|
Closing, my mistake: this isn't needed on the current tree. I opened it from a storm we recorded on 2026-10-23 on an older base, without re-testing. On our daily kernel (integration/aurora 420a1c8 + our board commits, without this patch), a muvm/libkrun guest running Steam has been up for 2 h 40 min with about 430 guest-vtimer IRQs a second across all cores, no storm. Something merged since (most likely the broken-SEIS workaround, #411) fixed what we saw. Sorry for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KVM guests don't boot on the T6040 (M4 Pro). A muvm/libkrun guest sits at 100% on vCPU 0, and the host's "kvm guest vtimer" IRQ fires about 1.3 million times a second on that core: the guest timer FIQ is never masked.
The T6040's AIC (
"apple,t6041-aic3", "apple,t8122-aic3") matches the generic t8122 entry, which masks the guest timers by writingVM_TMR_FIQ_ENA_EL2. On this SoC that write is silently ignored. T8142 traps the same write and already hasaic3_t8142_info(vm_timer_fiq_readonly), which masks them throughCNTP/CNTV_CTL_EL02IMASK instead. This addsapple,t6041-aic3to that entry; the binding already lists the compatible (#396).aic3_t8142_infodiffers fromaic3_infoonly in that flag, andof_match_node()prefers the DT's first compatible, so nothing else changes for the T6040.Tested: J616s; our daily 7.3 kernel carried this on 2026-10-23, and muvm/libkrun guests booted with it (a Battle.net session under muvm). Without it, the storm above. Built with W=1, checkpatch --strict clean.
Probably needed elsewhere, untested: the T8132 (M4) and T8140 (A18 Pro) device trees also fall to the generic t8122 entry. If their cores ignore the write the same way, their KVM guests storm too. I can't test those.
🤖 Generated with Claude Code