From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:12:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82062106564A; Fri, 19 Nov 2010 15:12:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7199A8FC13; Fri, 19 Nov 2010 15:12:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJFCJbO078204; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJFCJQm078202; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011191512.oAJFCJQm078202@svn.freebsd.org> From: Colin Percival Date: Fri, 19 Nov 2010 15:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215525 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:12:19 -0000 Author: cperciva Date: Fri Nov 19 15:12:19 2010 New Revision: 215525 URL: http://svn.freebsd.org/changeset/base/215525 Log: Make pmap_release consistent with pmap_pinit with respect to unpinning pages. The pinning of NPGPTD pages is #if 0ed out in pmap_pinit (I'm not quite sure why...) and this commit adds a corresponding #if 0 in pmap_release to avoid unpinning those pages. Some versions of Xen seem to silently ignore requests to unpin pages which were never pinned in the first place, but some return an error (causing FreeBSD to panic) prior to this commit. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Nov 19 15:07:36 2010 (r215524) +++ head/sys/i386/xen/pmap.c Fri Nov 19 15:12:19 2010 (r215525) @@ -1875,7 +1875,12 @@ pmap_release(pmap_t pmap) m = ptdpg[i]; ma = xpmap_ptom(VM_PAGE_TO_PHYS(m)); /* unpinning L1 and L2 treated the same */ +#if 0 xen_pgd_unpin(ma); +#else + if (i == NPGPTD) + xen_pgd_unpin(ma); +#endif #ifdef PAE if (i < NPGPTD) KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME),