PERFORCE change 133946 for review

Kip Macy kmacy at FreeBSD.org
Wed Jan 23 13:20:53 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133946

Change 133946 by kmacy at 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


More information about the p4-projects mailing list