diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-02-08 21:54:51 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-02-08 21:54:51 +0000 |
commit | 90862b22bb33b14bbd30c5e9dfc41da6a7686499 (patch) | |
tree | 3e72289fe3fff0bfe9435a1a38613d3ac6040d52 | |
parent | 9988f9e959efb1ef688ec12ec3f4d35575917499 (diff) | |
download | FreeBSD-src-90862b22bb33b14bbd30c5e9dfc41da6a7686499.zip FreeBSD-src-90862b22bb33b14bbd30c5e9dfc41da6a7686499.tar.gz |
Don't try to directly update page tables
-rw-r--r-- | sys/i386/xen/pmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 6ad67ff..4ef30f9 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -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); |