arm64: pseudo NMI bootconfig question

Masami Hiramatsu (Google) mhiramat at kernel.org
Wed Nov 12 20:34:03 PST 2025


On Wed, 12 Nov 2025 06:05:43 -0800
Breno Leitao <leitao at debian.org> wrote:

> Hello,
> 
> In most major Linux distributions, it’s common to have a separate debug kernel
> build. This variant is compiled with additional debug configuration options to
> provide deeper observability and easier debugging, typically at the expense of
> some performance.
> 
> This approach is also used in several companies, including mine. The debug
> flavor is usually a drop-in replacement deployed when investigating
> issues, allowing quicker identification before more detailed manual
> debugging.
> 
> I’m currently debugging some hung tasks using the debug kernel flavor and
> noticed that backtraces weren’t printed correctly because PSEUDO NMI isn’t
> enabled.
> 
> AFAIK, to enable PSEUDO NMI on ARM, the following are required:
> 
>  cmdline: irqchip.gicv3_pseudo_nmi=1
>  config: CONFIG_ARM64_PSEUDO_NMI=y
> 
> I wanted to have pseudo NMI enabled by default in the debug kernel
> (without relying on kernel command-line parameters), but this isn’t
> possible today. The reason is that `irqchip.gicv3_pseudo_nmi` is an early
> parameter, which can’t be set through bootconfig, so, independent of my
> .config, I need to hack cmdline arguments to have the debuggability
> I need.

Yeah, that parameter is for early architecture initialization,
which is done before parsing bootconfig.

Can you try building kernel with:

(arm)
CONFIG_CMDLINE="irqchip.gicv3_pseudo_nmi=1"
CONFIG_CMDLINE_EXTEND=y

(arm64)
cmdline=$(cat /proc/cmdline)
CONFIG_CMDLINE="irqchip.gicv3_pseudo_nmi=1 ${cmdline}"
CMDLINE_FORCE=y

BTW I wonder why you can not configure your bootloader to pass it.

Thank you,

> 
> Question:
> 
> Would it make sense to provide an option to enable pseudo NMI in certain
> kernel configuration without requiring an extra command-line parameter?

-- 
Masami Hiramatsu (Google) <mhiramat at kernel.org>



More information about the linux-arm-kernel mailing list