From owner-svn-src-projects@FreeBSD.ORG Thu Sep 19 01:55:58 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BA58BC8F; Thu, 19 Sep 2013 01:55:58 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A83F32712; Thu, 19 Sep 2013 01:55:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8J1twmZ011718; Thu, 19 Sep 2013 01:55:58 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8J1twdN011717; Thu, 19 Sep 2013 01:55:58 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201309190155.r8J1twdN011717@svn.freebsd.org> From: Neel Natu Date: Thu, 19 Sep 2013 01:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r255684 - projects/bhyve_npt_pmap/sys/amd64/amd64 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 01:55:58 -0000 Author: neel Date: Thu Sep 19 01:55:58 2013 New Revision: 255684 URL: http://svnweb.freebsd.org/changeset/base/255684 Log: If the page fault was triggered by reserved bits being set in the page table entry then panic immediately. Requested by: kib@ Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/trap.c Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/trap.c ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/amd64/trap.c Thu Sep 19 01:12:59 2013 (r255683) +++ projects/bhyve_npt_pmap/sys/amd64/amd64/trap.c Thu Sep 19 01:55:58 2013 (r255684) @@ -734,6 +734,14 @@ trap_pfault(frame, usermode) } /* + * If the trap was caused by errant bits in the PTE then panic. + */ + if (frame->tf_err & PGEX_RSV) { + trap_fatal(frame, eva); + return (-1); + } + + /* * PGEX_I is defined only if the execute disable bit capability is * supported and enabled. */ @@ -822,10 +830,11 @@ trap_fatal(frame, eva) #endif if (type == T_PAGEFLT) { printf("fault virtual address = 0x%lx\n", eva); - printf("fault code = %s %s %s, %s\n", + printf("fault code = %s %s %s%s, %s\n", code & PGEX_U ? "user" : "supervisor", code & PGEX_W ? "write" : "read", code & PGEX_I ? "instruction" : "data", + code & PGEX_RSV ? " rsv" : "", code & PGEX_P ? "protection violation" : "page not present"); } printf("instruction pointer = 0x%lx:0x%lx\n",