[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260125014224.249901-4-chang.seok.bae@intel.com>
Date: Sun, 25 Jan 2026 01:42:18 +0000
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
peterz@...radead.org,
david.kaplan@....com,
chang.seok.bae@...el.com
Subject: [PATCH 3/7] x86/nmi: Support stop_machine_nmi() handler
From: David Kaplan <david.kaplan@....com>
Call stop_machine_nmi_handler() from the NMI path when the corresponding
static key is enabled, in order to support stop_machine_nmi().
Signed-off-by: David Kaplan <david.kaplan@....com>
Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
---
Update from the original posting:
* Massage the subject and expand changelog a little bit.
---
arch/x86/kernel/nmi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 3d239ed12744..4bc4b49f1ea7 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -24,6 +24,7 @@
#include <linux/export.h>
#include <linux/atomic.h>
#include <linux/sched/clock.h>
+#include <linux/stop_machine.h>
#include <linux/kvm_types.h>
#include <asm/cpu_entry_area.h>
@@ -382,6 +383,9 @@ static noinstr void default_do_nmi(struct pt_regs *regs)
instrumentation_begin();
+ if (stop_machine_nmi_handler_enabled() && stop_machine_nmi_handler())
+ goto out;
+
if (microcode_nmi_handler_enabled() && microcode_nmi_handler())
goto out;
--
2.51.0
Powered by blists - more mailing lists