[PATCH v2 23/39] arm64: cpufeature: Detect PE support for FEAT_NMI

Vladimir Murzin vladimir.murzin at arm.com
Wed Nov 25 07:05:41 PST 2026


On 11/12/26 13:20, Vladimir Murzin wrote:
> +static void nmi_enable(const struct arm64_cpu_capabilities *__unused)
> +{
> +	/*
> +	 * Enable use of NMIs controlled by ALLINT, SPINTMASK should
> +	 * be clear by default but make it explicit that we are using
> +	 * this mode.  Ensure that ALLINT is clear first in order to
> +	 * avoid leaving things masked.
> +	 */
> +	_allint_clear();
> +	sysreg_clear_set(sctlr_el1, SCTLR_EL1_SPINTMASK, SCTLR_EL1_NMI);
> +	isb();
> +}

Sashiko correctly pointed out that nmi_enable() unmasks PSTATE.ALLINT
on secondary CPUs while PSTATE.DAIF is still fully masked. I'm planing
to drop enable callback and perform unmasking on corresponding paths
for boot and secondary CPU [1]

[1] https://lore.kernel.org/linux-arm-kernel/18952733-d1a6-4292-ad30-7d45d1b1d3a9@arm.com/

Thanks
Vladimir



More information about the linux-arm-kernel mailing list