From ff0b083be0b86e26c95d612fc03af9073a98362f Mon Sep 17 00:00:00 2001 From: Jonathan Goyvaerts Date: Fri, 23 Oct 2026 11:20:40 -0300 Subject: [PATCH] irqchip/apple-aic: mask t6041 guest timers through EL02 controls 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 Assisted-by: LLM --- drivers/irqchip/irq-apple-aic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c index 3214501a10635..3816621263207 100644 --- a/drivers/irqchip/irq-apple-aic.c +++ b/drivers/irqchip/irq-apple-aic.c @@ -320,6 +320,10 @@ static const struct of_device_id aic_info_match[] = { .compatible = "apple,t8142-aic3", .data = &aic3_t8142_info, }, + { + .compatible = "apple,t6041-aic3", + .data = &aic3_t8142_info, + }, { .compatible = "apple,t8103-aic", .data = &aic1_local_fipi_info, @@ -520,8 +524,9 @@ static unsigned long aic_fiq_get_idx(struct irq_data *d) } /* - * T8142 traps writes to VM_TMR_FIQ_ENA_EL2. Mask the guest timers through - * their architectural EL02 controls instead, leaving the older SoCs alone. + * T8142 traps and T6041 ignores writes to VM_TMR_FIQ_ENA_EL2. Mask the guest + * timers through their architectural EL02 controls instead, leaving the older + * SoCs alone. */ static void aic_vm_timer_mask(u64 timers, bool mask) {