register_nmi_handler(9)
π register_nmi_handler(9) π
okay so bestie, welcome to the Kernel API Manual β this page is all about register_nmi_handler and it's lowkey iconic π«Άβ¨
π NAME π
register_nmi_handler β Register a handler for a specific NMI type π
β¨ SYNOPSIS β¨
register_nmi_handler (t , fn , fg , n , init... );
πΈ ARGUMENTS πΈ
tβ NMI type, likeNMI_LOCALfr fr.fnβ the NMI handler itself πfgβ the flags associated with the NMI handler π©nβ name of the NMI handler π·οΈinitβ optional__init*attributes forstruct nmiactionβ¨
π¦ DESCRIPTION π¦
So what it does: it adds the provided handler to the list of handlers for the specified NMI type π«Ά Handlers flagged with NMI_FLAG_FIRST would be executed first β yes, first is first, no cap π
Sometimes the source of an NMI can't be reliably determined, which results in an NMI being tagged as "unknown" π When that happens, register an additional handler using the NMI type - NMI_UNKNOWN to handle such cases. The caller would get one last chance to assume responsibility for the NMI ππ₯
π RETURN π
0 on success, or an error code on failure π manifesting zero, but prepare for the error code bestie.
π SEE ALSO π
- Kernel file
./arch/x86/include/asm/nmi.henum(anonymous)(9)π unregister_nmi_handler(9)β the counterpart, obviously π
and yeah, this lil page's source/version is ./arch/x86/include/asm, dated October 2026, and it's serving register_nmi_handler(9) energy β periodt ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms