A cpuctl(4) write that stops or reprograms IBS can clear the valid bit
of a sample whose NMI is already raised. hwpmc then declines the NMI,
no other handler claims it, and with the default machdep.panic_on_nmi
the system panics.
Have nmi_handle_intr() claim, after all handlers declined it, one NMI
per cpuctl write to an IBS control MSR. Claiming last, rather than
from a cpuctl NMI handler, cannot take an NMI away from hwpmc.
cpuctl.ko now needs the new kernel symbols; an MFC has to update both.
Reproduced on an EPYC 9654 by toggling IBS op through /dev/cpuctlN:
about one unclaimed NMI per 2000 toggles.
MFC after: 2 weeks
Sponsored by: AMD
Signed-off-by: Osvaldo Janeri Filho <ojanerif@amd.com>