mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/2] genirq: add migratable NMI registration and show NMI counts
@ 2026-11-14 23:49 Ashok Raj
  2026-11-14 23:49 ` [RFC PATCH v1 1/2] genirq: Add migratable NMI registration mode Ashok Raj
  2026-11-14 23:49 ` [RFC PATCH v1 2/2] genirq/proc: Show NMI interrupt counts in /proc/interrupts Ashok Raj
  0 siblings, 2 replies; 3+ messages in thread
From: Ashok Raj @ 2026-11-14 23:49 UTC (permalink / raw)
  To: Linux ARM Kernel
  Cc: Linux Kernel Mailing List, Vladimir Murzin, Catalin Marinas,
	Will Deacon, Mark Rutland, Lorenzo Pieralisi, Jinjie Ruan,
	Liaochang, Marc Zyngier, Radu Rendec, Jonathan Cameron,
	Ashok Raj, Sathvika Vasireddy

request_nmi() currently models NMIs as per-CPU sources. This does not
represent a globally routed NMI source with an affinity-capable irqchip,
which needs to be rerouted when its target CPU is offlined.

This RFC adds IRQF_NMI_MIGRATABLE as a request_nmi() registration mode
for such a source. It remains excluded from normal IRQ balancing, but the
generic startup and CPU-hotplug paths may select an online target. The
second patch fixes the related /proc/interrupts display: NMI-safe flow
handling updates the per-CPU counters rather than irq_desc::tot_count.

Patch 1: Add the migratable-NMI registration mode, validate that it is
used only through request_nmi() with an affinity-capable non-per-CPU
irqchip, and add IRQ KUnit coverage for registration and CPU-offline
migration.

Patch 2: Emit the per-CPU counters for all NMI descriptors, matching
kstat_irqs_desc().

Testing:
  - ARM64 changed-object builds with WERROR=1
  - ARM64 !SMP changed-object build
  - ARM64 IRQ KUnit run under QEMU with two CPUs, including registration
    validation and CPU-offline migration
  - local downstream GHES delivery and migration validation for the intended
    consumer topology (not part of this series)

Base and dependencies:

This RFC was developed and tested on v7.4-rc2 plus the FEAT_NMI v2 series
[1]. It depends on that series' GIC NMI support and is therefore not directly
applicable to mainline or linux-next as posted. This RFC is for design
feedback; it will need rebasing onto the upstream form of those prerequisites
before submission.

[1] https://lore.kernel.org/linux-arm-kernel/20261112132042.129062-1-vladimir.murzin@arm.com/

A separate GHES Type-4 series is the intended first consumer and is not
included here.

Feedback is particularly welcome on the IRQF_NMI_MIGRATABLE API and its
placement in the generic IRQ API, as well as the NMI accounting presentation
in /proc/interrupts.

Ashok Raj (2):
  genirq: Add migratable NMI registration mode
  genirq/proc: Show NMI interrupt counts in /proc/interrupts

 include/linux/interrupt.h |   2 +
 kernel/irq/irq_test.c     | 141 +++++++++++++++++++++++++++++++++++++-
 kernel/irq/manage.c       |  33 +++++++--
 kernel/irq/proc.c         |   7 +-
 4 files changed, 172 insertions(+), 11 deletions(-)


--
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-14 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 23:49 [RFC PATCH v1 0/2] genirq: add migratable NMI registration and show NMI counts Ashok Raj
2026-11-14 23:49 ` [RFC PATCH v1 1/2] genirq: Add migratable NMI registration mode Ashok Raj
2026-11-14 23:49 ` [RFC PATCH v1 2/2] genirq/proc: Show NMI interrupt counts in /proc/interrupts Ashok Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®