The NMI-source bitmap is critical information provided by the NMI-source reporting feature. It is very useful in debugging unknown NMIs since it can pinpoint the exact source that caused the NMI. Print the source bitmap along with the "Unknown NMI" kernel log message. Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx> --- v6: Drop the tracepoint modification part for now. v5: New patch --- arch/x86/kernel/nmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 55ecbe2ab5e4..7a288603683f 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -376,6 +376,9 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs) pr_emerg_ratelimited("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n", reason, smp_processor_id()); + if (cpu_feature_enabled(X86_FEATURE_NMI_SOURCE)) + pr_emerg_ratelimited("NMI-source bitmap is 0x%lx\n", fred_event_data(regs)); + if (unknown_nmi_panic || panic_on_unrecovered_nmi) nmi_panic(regs, "NMI: Not continuing"); -- 2.43.0