Commit 08f4f41c authored by Marc Zyngier's avatar Marc Zyngier Committed by Oliver Upton
Browse files

irqchip/apple-aic: Spit out ICH_MISR_EL2 value on spurious vGIC MI



It is all good and well to scream about spurious vGIC maintenance
interrupts. It would be even better to output the reason why, which
is already checked, but not printed out.

The unsuspecting kernel tinkerer thanks you.

Tested-by: default avatarFuad Tabba <tabba@google.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Tested-by: default avatarMark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2267180-4-maz@kernel.org


Signed-off-by: default avatarOliver Upton <oupton@kernel.org>
parent fa8f11e8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -411,12 +411,15 @@ static void __exception_irq_entry aic_handle_irq(struct pt_regs *regs)
	if (is_kernel_in_hyp_mode() &&
	    (read_sysreg_s(SYS_ICH_HCR_EL2) & ICH_HCR_EL2_En) &&
	    read_sysreg_s(SYS_ICH_MISR_EL2) != 0) {
		u64 val;

		generic_handle_domain_irq(aic_irqc->hw_domain,
					  AIC_FIQ_HWIRQ(AIC_VGIC_MI));

		if (unlikely((read_sysreg_s(SYS_ICH_HCR_EL2) & ICH_HCR_EL2_En) &&
			     read_sysreg_s(SYS_ICH_MISR_EL2))) {
			pr_err_ratelimited("vGIC IRQ fired and not handled by KVM, disabling.\n");
			     (val = read_sysreg_s(SYS_ICH_MISR_EL2)))) {
			pr_err_ratelimited("vGIC IRQ fired and not handled by KVM (MISR=%llx), disabling.\n",
					   val);
			sysreg_clear_set_s(SYS_ICH_HCR_EL2, ICH_HCR_EL2_En, 0);
		}
	}