Re: [PATCH v2 10/14] arm64/nmi: Manage masking for superpriority interrupts along with DAIF

Mark Brown
2022-12-13T13:15:10Z

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

On Tue, Dec 13, 2022 at 09:37:56AM +0100, Lorenzo Pieralisi wrote:
> On Mon, Dec 12, 2022 at 02:03:33PM +0000, Mark Brown wrote:

> > A first pass suggests that we should be handling this like we do for
> > other preemptions and returning early from arm64_preempt_schedule_irq()
> > if ALLINT is masked. If we are handling a regular IRQ then ALLINT will
> > be unmasked and we'll call into preempt_schedule_irq(), if we're
> > handling a NMI then ALLINT will still be masked so we don't attempt to
> > schedule. I've pushed out a change which does this but not yet properly
> > tested it.

> Yes that's what should happen (actually if we are handling an NMI we
> should not even get to the point where a decision about preemption is
> made el1_interrupt() just returns).

OK, great. It would be good to understand where the preemption is
happening, I suspect you're hitting it from some place I'm not. I did
verify that I'm seeing preemptions during boot, it just wasn't stalling
for me.

> > Do you have any specifics on how you're seeing problems? You did
> > mention boot stalls offline but I've not been able to to reproduce this
> > locally in a way that I can identify (based on your mail now I've made
> > sure I've got preemption enabled).

> defconfig, barebone rootfs, boot stalls (because we are scheduling with
> IRQs off and there is nothing clearing ALLINT in the preemption path
> so system hangs).

> I don't know why you can't reproduce it don't know if it is the Kconfig
> or file system configuration (or the FVP params - for this to show up
> FEAT_NMI must obviously be enabled - I am testing the branch Marc posted
> so that I can test the vGIC patches but this is definitely not a vGIC
> bug).

It might be Marc's changes I guess, I didn't pull them in but I don't
see anything there that should be doing anything without running a guest
either...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]