[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b119c9ef-2963-4e28-89d3-2b1c8e64ec69@zytor.com>
Date: Tue, 3 Jun 2025 09:53:00 -0700
From: Xin Li <xin@...or.com>
To: Sohil Mehta <sohil.mehta@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: "H . Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Sean Christopherson <seanjc@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, Tony Luck <tony.luck@...el.com>,
Zhang Rui <rui.zhang@...el.com>, Steven Rostedt <rostedt@...dmis.org>,
Andrew Cooper <andrew.cooper3@...rix.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Jacob Pan <jacob.pan@...ux.microsoft.com>,
Andi Kleen <ak@...ux.intel.com>, Kai Huang <kai.huang@...el.com>,
Sandipan Das <sandipan.das@....com>, linux-perf-users@...r.kernel.org,
linux-edac@...r.kernel.org, kvm@...r.kernel.org,
linux-pm@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v6 5/9] x86/nmi: Add support to handle NMIs with source
information
On 5/13/2025 1:37 PM, Sohil Mehta wrote:
> The NMI-source bitmap is delivered as FRED event data to the kernel.
> When available, use NMI-source based filtering to determine the exact
> handlers to run.
>
> Activate NMI-source based filtering only for Local NMIs. While handling
> platform NMI types (such as SERR and IOCHK), do not use the source
> bitmap. They have only one handler registered per type, so there is no
> need to disambiguate between multiple handlers.
>
> Some third-party chipsets may send NMI messages with a hardcoded vector
> of 2, which would result in bit 2 being set in the NMI-source bitmap.
> Skip the local NMI handlers in this situation.
>
> Bit 0 of the source bitmap is set by the hardware whenever a source
> vector was not used while generating an NMI, or the originator could not
> be reliably identified. Poll all the registered handlers in that case.
>
> When multiple handlers need to be executed, adhere to the existing
> priority scheme and execute the handlers registered with NMI_FLAG_FIRST
> before others.
>
> The logic for handling legacy NMIs is unaffected since the source bitmap
> would always have all bits set.
>
> Suggested-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Signed-off-by: Sohil Mehta <sohil.mehta@...el.com>
Reviewed-by: Xin Li (Intel) <xin@...or.com>
Powered by blists - more mailing lists