]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r360328 (by vangyzen):
authorAlexander Motin <mav@FreeBSD.org>
Fri, 7 Aug 2020 00:56:20 +0000 (00:56 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Fri, 7 Aug 2020 00:56:20 +0000 (00:56 +0000)
commitcdfd90fa660eb94bc668fef944be8689fb037fed
tree7f7161370e4d63422655e6fea005c33bfa6d1752
parentd842c05db21354afa30ef257d3d87509f897e610
MFC r360328 (by vangyzen):
Fix handling of NMIs from unknown sources (BMC, hypervisor)

Release kernels have no KDB backends enabled, so they discard an NMI
if it is not due to a hardware failure.  This includes NMIs from
IPMI BMCs and hypervisors.

Furthermore, the interaction of panic_on_nmi, kdb_on_nmi, and
debugger_on_panic is confusing.

Respond to all NMIs according to panic_on_nmi and debugger_on_panic.
Remove kdb_on_nmi.  Expand the meaning of panic_on_nmi by making
it a bitfield.  There are currently two bits: one for NMIs due to
hardware failure, and one for all others.  Leave room for more.

If panic_on_nmi and debugger_on_panic are both true, don't actually panic,
but directly enter the debugger, to allow someone to leave the debugger
and [hopefully] resume normal execution.

Relnotes: yes: machdep.kdb_on_nmi is gone; machdep.panic_on_nmi changed
sys/kern/kern_shutdown.c
sys/sys/kdb.h
sys/x86/x86/cpu_machdep.c