]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Stop clearing x87 exceptions in the #MF handler on amd64. If user code
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 21 Jul 2012 13:05:34 +0000 (13:05 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 21 Jul 2012 13:05:34 +0000 (13:05 +0000)
commitdfa8a512889717bb50d2c24756da93b2fe67d1fd
tree9aa0244ca53fc5456ef3b730be80988468c94b1e
parenta53cab2c6cea8e50baed7d87f37cc56cf52ac181
Stop clearing x87 exceptions in the #MF handler on amd64. If user code
understands FPU hardware enough to catch SIGFPE and unmask exceptions
in control word, then it may as well properly handle return from
SIGFPE without causing an infinite loop of #MF exceptions due to
faulting instruction restart, when needed.

Clearing exceptions causes information loss for handlers which do
understand FPU hardware, and struct siginfo si_code member cannot be
considered adequate replacement for en_sw content due to translation.

Supposed reason for clearing the exceptions, which is IRQ13 handling
oddities, were never applicable to amd64.

Note: this change will be merged to i386 kernel as well, since we do
not support IRQ13 delivery of #MF notifications for some time.

Requested by: bde
MFC after: 1 week
sys/amd64/amd64/fpu.c