From ebc00c30c65023bd1498ae20dc511c4e39f6c0f7 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Tue, 4 Aug 2026 10:50:11 +0100 Subject: [PATCH] x86/nmi: Drop K7_NMI_EVENT This name is misleading. It's not possible to configure NMI or not from the event select register; that comes from the APIC configuration for performance events. This name is "the thing we want to count for the NMI watchdog", but that's clearer to follow when it simply names the event. Drop the indirection. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- xen/arch/x86/nmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 2ec567c114..b71bf43635 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -102,7 +102,6 @@ static int nmi_active; #define K7_EVNTSEL_OS (1 << 17) #define K7_EVNTSEL_USR (1 << 16) #define K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING 0x76 -#define K7_NMI_EVENT K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING #define K7_EVENT_WIDTH 32 #define P6_EVNTSEL0_ENABLE (1 << 22) @@ -259,7 +258,7 @@ static void setup_k7_watchdog(void) evntsel = K7_EVNTSEL_INT | K7_EVNTSEL_OS | K7_EVNTSEL_USR - | K7_NMI_EVENT; + | K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING; wrmsrns(MSR_K7_EVNTSEL0, evntsel); write_watchdog_counter("K7_PERFCTR0");