Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2008 21:20:52 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133946 for review
Message-ID:  <200801232120.m0NLKqWu005655@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133946

Change 133946 by kmacy@pandemonium:kmacy:xen31 on 2008/01/23 21:20:29

	mask off the upper bits so that PG_NX isn't accidentally treated as an index
	pointed out by alc

Affected files ...

.. //depot/projects/xen31/sys/i386/include/xen/xenpmap.h#9 edit

Differences ...

==== //depot/projects/xen31/sys/i386/include/xen/xenpmap.h#9 (text+ko) ====

@@ -202,13 +202,17 @@
 static __inline vm_paddr_t
 xpmap_mtop(vm_paddr_t mpa)
 {
-    return machtophys(mpa) | (mpa & PAGE_MASK);
+	vm_paddr_t tmp = (mpa & PG_FRAME);
+	
+	return machtophys(tmp) | (mpa & ~PG_FRAME);
 }
 
 static __inline vm_paddr_t
 xpmap_ptom(vm_paddr_t ppa)
 {
-    return phystomach(ppa) | (ppa & PAGE_MASK);
+	vm_paddr_t tmp = (ppa & PG_FRAME);
+
+	return phystomach(tmp) | (ppa & ~PG_FRAME);
 }
 
 static __inline void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801232120.m0NLKqWu005655>