Date: Wed, 23 Jan 2008 01:00:29 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133900 for review Message-ID: <200801230100.m0N10TLL087320@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133900 Change 133900 by kmacy@pandemonium:kmacy:xen31 on 2008/01/23 00:59:30 cleanup multicall code slightly set dirty and referenced bit in pmap_qenter Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#29 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#29 (text+ko) ==== @@ -1219,22 +1219,23 @@ { pt_entry_t *endpte, *pte; vm_paddr_t pa; + vm_offset_t va = sva; int mclcount = 0; multicall_entry_t mcl[16]; multicall_entry_t *mclp = mcl; - + pte = vtopte(sva); endpte = pte + count; while (pte < endpte) { - pa = xpmap_ptom(VM_PAGE_TO_PHYS(*ma)) | pgeflag | PG_RW | PG_V; + pa = xpmap_ptom(VM_PAGE_TO_PHYS(*ma)) | pgeflag | PG_RW | PG_V | PG_M | PG_A; mclp->op = __HYPERVISOR_update_va_mapping; - mclp->args[0] = sva; + mclp->args[0] = va; mclp->args[1] = (uint32_t)(pa & 0xffffffff); mclp->args[2] = (uint32_t)(pa >> 32); mclp->args[3] = (*pte & PG_V) ? UVMF_INVLPG|UVMF_ALL : 0; - sva += PAGE_SIZE; + va += PAGE_SIZE; pte++; ma++; mclp++; @@ -1247,8 +1248,8 @@ } if (mclcount) HYPERVISOR_multicall(mcl, mclcount); +} -} /* * This routine tears out page mappings from the @@ -2732,9 +2733,8 @@ vm_page_t m, mpte; vm_pindex_t diff, psize; multicall_entry_t mcl[16]; - multicall_entry_t *mclpstart, *mclp; + multicall_entry_t *mclp = mcl; int count = 0; - mclpstart = mclp = mcl; VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED); psize = atop(end - start); @@ -2749,13 +2749,13 @@ mclp++; count++; if (count == 16) { - HYPERVISOR_multicall(mclpstart, count); - mclp = mclpstart; + HYPERVISOR_multicall(mcl, count); + mclp = mcl; count = 0; } } if (count) - HYPERVISOR_multicall(mclpstart, count); + HYPERVISOR_multicall(mcl, count); PMAP_UNLOCK(pmap); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801230100.m0N10TLL087320>