From owner-cvs-src@FreeBSD.ORG Sat Sep 3 11:57:29 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F3F316A41F; Sat, 3 Sep 2005 11:57:29 +0000 (GMT) (envelope-from jkoshy@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DFDF43D45; Sat, 3 Sep 2005 11:57:29 +0000 (GMT) (envelope-from jkoshy@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j83BvTIT046137; Sat, 3 Sep 2005 11:57:29 GMT (envelope-from jkoshy@repoman.freebsd.org) Received: (from jkoshy@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j83BvTMI046136; Sat, 3 Sep 2005 11:57:29 GMT (envelope-from jkoshy) Message-Id: <200509031157.j83BvTMI046136@repoman.freebsd.org> From: Joseph Koshy Date: Sat, 3 Sep 2005 11:57:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/amd64/amd64 db_trace.c exception.S genassym.c trap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Sep 2005 11:57:29 -0000 jkoshy 2005-09-03 11:57:28 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/amd64/amd64 db_trace.c exception.S genassym.c trap.c Log: MFC: { db_trace.c:1.69, exception.S:1.127, genassym.c:1.156, trap.c:1.290 } - Special-case NMI handling on the AMD64. On entry or exit from the kernel the 'alltraps' and 'doreti' the code used 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 (an older version) and ups Approved by: re (scottl) Revision Changes Path 1.66.2.1 +2 -1 src/sys/amd64/amd64/db_trace.c 1.125.2.1 +76 -2 src/sys/amd64/amd64/exception.S 1.155.2.1 +2 -0 src/sys/amd64/amd64/genassym.c 1.289.2.1 +2 -1 src/sys/amd64/amd64/trap.c