[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a7363cd-01e9-645c-e9b8-a81005210253@marcan.st>
Date: Fri, 26 Mar 2021 16:57:29 +0900
From: Hector Martin <marcan@...can.st>
To: Marc Zyngier <maz@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org,
Rob Herring <robh@...nel.org>, Arnd Bergmann <arnd@...nel.org>,
Olof Johansson <olof@...om.net>,
Krzysztof Kozlowski <krzk@...nel.org>,
Mark Kettenis <mark.kettenis@...all.nl>,
Tony Lindgren <tony@...mide.com>,
Mohamed Mediouni <mohamed.mediouni@...amail.com>,
Stan Skowronek <stan@...ellium.com>,
Alexander Graf <graf@...zon.com>,
Will Deacon <will@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Christoph Hellwig <hch@...radead.org>,
"David S. Miller" <davem@...emloft.net>,
devicetree@...r.kernel.org, linux-serial@...r.kernel.org,
linux-doc@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple
Interrupt Controller
On 08/03/2021 22.31, Marc Zyngier wrote:
>> + if ((read_sysreg_s(SYS_ICH_HCR_EL2) & ICH_HCR_EN) &&
>> + read_sysreg_s(SYS_ICH_MISR_EL2) != 0) {
>> + pr_err("vGIC IRQ fired, disabling.\n");
>
> Please add a _ratelimited here. Whilst debugging KVM on this machine,
> I ended up with this firing at such a rate that it was impossible to
> do anything useful. Ratelimiting it allowed me to pinpoint the
> problem.
Ouch. Done for v4.
>> +static void aic_fiq_eoi(struct irq_data *d)
>> +{
>> + /* We mask to ack (where we can), so we need to unmask at EOI. */
>> + if (!irqd_irq_disabled(d) && !irqd_irq_masked(d))
>
> Ah, be careful here: irqd_irq_masked() doesn't do what you think it
> does for per-CPU interrupts. It's been on my list to fix for the rVIC
> implementation, but I never got around to doing it, and all decent ICs
> hide this from SW by having a HW-managed mask, similar to what is on
> the IRQ side.
>
> I can see two possibilities:
>
> - you can track the masked state directly and use that instead of
> these predicates
>
> - you can just drop the masking altogether as this is only useful to a
> hosted hypervisor (KVM), which will have to do its own masking
> behind the scenes anyway
>
Since you're using the masking in KVM after all, I'm tracking the mask
state in a percpu variable now. Also folded in your two minor bugfixes
from the KVM series. Cheers!
--
Hector Martin (marcan@...can.st)
Public Key: https://mrcn.st/pub
Powered by blists - more mailing lists