]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: preserve %cr2 in NMI/MCE/DBG handlers.
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 25 Dec 2020 21:58:43 +0000 (23:58 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Sun, 27 Dec 2020 10:59:33 +0000 (12:59 +0200)
commitd39f7430a6e1da419d6e4fb871bca5ba7863f738
treed04528d9b84a823665eae4b07c8dec5256fef0ab
parent9dd48b87e6caa617799700db7f2f5db91b68dbcc
amd64: preserve %cr2 in NMI/MCE/DBG handlers.

These handlers could interrupt code which has interrupts disabled,
and if a spurious page fault occurs during exception handler run,
we get clobbered %cr2 in higher level stack.

This is mostly a speculation, but it is based on hints from good sources.

MFC after: 1 week
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27772
sys/amd64/amd64/exception.S
sys/amd64/amd64/support.S