From owner-svn-src-projects@FreeBSD.ORG Thu Oct 3 21:46:44 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 869F8F5; Thu, 3 Oct 2013 21:46:44 +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 736BE21ED; Thu, 3 Oct 2013 21:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r93Lkits047425; Thu, 3 Oct 2013 21:46:44 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r93LkiBN047424; Thu, 3 Oct 2013 21:46:44 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201310032146.r93LkiBN047424@svn.freebsd.org> From: Neel Natu Date: Thu, 3 Oct 2013 21:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r256031 - 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, 03 Oct 2013 21:46:44 -0000 Author: neel Date: Thu Oct 3 21:46:43 2013 New Revision: 256031 URL: http://svnweb.freebsd.org/changeset/base/256031 Log: Add a comment in pmap_copy() explaining why we skip the function entirely for emulated pmaps. Requested by: alc@ Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Oct 3 20:38:57 2013 (r256030) +++ projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Oct 3 21:46:43 2013 (r256031) @@ -4762,6 +4762,14 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (dst_pmap->pm_type != src_pmap->pm_type) return; + /* + * EPT page table entries that require emulation of A/D bits are + * sensitive to clearing the PG_A bit (aka EPT_PG_READ). Although + * we clear PG_M (aka EPT_PG_WRITE) concomitantly, the PG_U bit + * (aka EPT_PG_EXECUTE) could still be set. Since some EPT + * implementations flag an EPT misconfiguration for exec-only + * mappings we skip this function entirely for emulated pmaps. + */ if (pmap_emulate_ad_bits(dst_pmap)) return;