On 7/8/2025 12:30 AM, Zhuo, Qiuxu wrote: >> From: Mehta, Sohil <sohil.mehta@xxxxxxxxx> >> >> We have warnings that should flag any time multiple handlers are registered >> for SERR or IO_CHK: >> >> /* >> * Indicate if there are multiple registrations on the >> * internal NMI handler call chains (SERR and IO_CHECK). >> */ >> WARN_ON_ONCE(type == NMI_SERR && !list_empty(&desc->head)); >> WARN_ON_ONCE(type == NMI_IO_CHECK && !list_empty(&desc- >>> head)); >> > > The warning doesn't imply that it must be a single NMI handler. > Otherwise, why not use a single NMI callback pointer per platform NMI > type for registration in the current NMI code? > You are right, the warning doesn't prevent multiple handlers from being registered. But, it is also impractical that someone ignores a kernel warning in production. > I just don't want your comments or commit messages to > mismatch the current code as it stands. > Having precise comments is definitely better. I will reword the comment to say why NMI-source reporting isn't needed in practice for platform NMIs.