Re: [PATCH] arm64: sdei: add sdei_nmi.disabled= to keep the GIC NMI path reachable

From: Jinjie Ruan

Date: Tue Nov 24 2026 - 21:31:56 EST


Hi Kiryl,

在 2026/11/25 2:12, Kiryl Shutsemau (Meta) 写道:
> On Mon, Nov 23, 2026 at 11:32:22AM +0800, Jinjie Ruan wrote:
>> While the SDEI cross-CPU NMI is active it claims every cross-CPU
>> backtrace, so on a platform whose firmware exposes SDEI event 0
>> the irqchip NMI path can never be used. There is no way to opt out.
>>
>> Add a boot parameter "sdei_nmi.disabled".
>>
>> With sdei_nmi.disabled=1, the SDEI NMI stays registered and simply
>> declines every request, so arch_trigger_cpumask_backtrace() falls
>> through to its IPI path and smp_send_stop() skips its SDEI rung.
>
> Why keep event 0 registered and enabled when the switch is on?

These original codes are left for testing the IPI as NMI function.

>
> If sdei_nmi_init() returns before sdei_event_register(),
> sdei_nmi_available stays false and both hooks already decline.

You are absolutely correct. sdei_nmi_available itself can block all SDEI
operations, which can simplify many things.

>
> Then the flag is read only at init and can be __initdata. None of the
> other hunks are needed. The check in sdei_nmi_stop_cpus() is not
> reachable anyway: smp_send_stop() calls it only after sdei_nmi_active().

Yes, you are right! I will update them.

Best regards,
Jinjie

>
> --
> Kiryl Shutsemau / Kirill A. Shutemov