From owner-svn-src-all@FreeBSD.ORG Sun Feb 8 21:54:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D94710656BE; Sun, 8 Feb 2009 21:54:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AEB78FC0C; Sun, 8 Feb 2009 21:54:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n18Lsp2p035510; Sun, 8 Feb 2009 21:54:51 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n18LspRB035509; Sun, 8 Feb 2009 21:54:51 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200902082154.n18LspRB035509@svn.freebsd.org> From: Kip Macy Date: Sun, 8 Feb 2009 21:54:51 +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: r188341 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2009 21:54:53 -0000 Author: kmacy Date: Sun Feb 8 21:54:51 2009 New Revision: 188341 URL: http://svn.freebsd.org/changeset/base/188341 Log: Don't try to directly update page tables Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sun Feb 8 21:50:47 2009 (r188340) +++ head/sys/i386/xen/pmap.c Sun Feb 8 21:54:51 2009 (r188341) @@ -3713,14 +3713,17 @@ pmap_remove_write(vm_page_t m) retry: oldpte = *pte; if ((oldpte & PG_RW) != 0) { + vm_paddr_t newpte = oldpte & ~(PG_RW | PG_M); + /* * Regardless of whether a pte is 32 or 64 bits * in size, PG_RW and PG_M are among the least * significant 32 bits. */ - if (!atomic_cmpset_int((u_int *)pte, oldpte, - oldpte & ~(PG_RW | PG_M))) + PT_SET_VA_MA(pte, newpte, TRUE); + if (*pte != newpte) goto retry; + if ((oldpte & PG_M) != 0) vm_page_dirty(m); pmap_invalidate_page(pmap, pv->pv_va);