Date: Sat, 27 Aug 2005 16:03:40 +0000 (UTC) From: Joseph Koshy <jkoshy@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/amd64/amd64 db_trace.c exception.S genassym.c trap.c Message-ID: <200508271603.j7RG3eMI062683@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jkoshy 2005-08-27 16:03:40 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 db_trace.c exception.S genassym.c trap.c
Log:
- Special-case NMI handling on the AMD64.
On entry or exit from the kernel the 'alltraps' and 'doreti' code
used taken by normal traps disables interrupts to protect the
critical sections where it is setting up %gs.
This protection is insufficient in the presence of NMIs since NMIs
can be taken even when the processor has disabled normal interrupts.
Thus the NMI handler needs to actually read MSR_GBASE on entry to
the kernel to determine whether a swap of %gs using 'swapgs' is
needed. However, reads of MSRs are expensive and integrating this
check into the 'alltraps'/'doreti' path would penalize normal
interrupts.
- Teach DDB about the 'nmi_calltrap' symbol.
Reviewed by: bde, peter (older versions of this change)
Revision Changes Path
1.69 +2 -1 src/sys/amd64/amd64/db_trace.c
1.127 +76 -2 src/sys/amd64/amd64/exception.S
1.156 +2 -0 src/sys/amd64/amd64/genassym.c
1.290 +2 -1 src/sys/amd64/amd64/trap.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508271603.j7RG3eMI062683>
