Thread (42 messages) 42 messages, 7 authors, 2025-07-24

Re: [PATCH v7 06/10] x86/nmi: Add support to handle NMIs with source information

From: Sohil Mehta <hidden>
Date: 2025-07-07 20:32:33
Also in: kvm, linux-edac, linux-perf-users, linux-pm, lkml

On 7/7/2025 6:50 AM, Zhuo, Qiuxu wrote:
Is it possible for the "source_bitmap" to have some non-NMIS_NO_SOURCE bit set 
while the user registers their NMI handler with the NMIS_NO_SOURCE type? 
IIUC, this is what you are asking:

Someone registers a handler without any source information.
For example, GHES does this.

register_nmi_handler(NMI_LOCAL, ghes_notify_nmi, 0, "ghes", NMIS_NO_SOURCE);

Now, when a GHES NMI shows up, can it have anything other than bit 0
(NMIS_NO_SOURCE) set in the source bitmap?

I believe the answer is no. Unless the GHES implementation or the
hardware has a bug, this should not happen. If this happens, it would
get logged as an unknown NMI in the kernel log.

If so, we may need to allow the NMI handler with the NMIS_NO_SOURCE type to be 
invoked unconditionally to ensure no NMIs are lost.
If the kernel can't rely on the accuracy of the source_bitmap, then
NMI-source as a feature starts losing value.

Sohil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help