/* * pmap_map_ptes: map a pmap's PTEs into KVM and lock them in * * there are several pmaps involved. some or all of them might be same. * * - the pmap given by the first argument * our caller wants to access this pmap's PTEs. * * - pmap_kernel() * the kernel pmap. note that it only contains the kernel part * of the address space which is shared by any pmap. ie. any * pmap can be used instead of pmap_kernel() for our purpose. * * - ci->ci_pmap * pmap currently loaded on the cpu. * * - vm_map_pmap(&curproc->p_vmspace->vm_map) * current process' pmap. * * => we lock enough pmaps to keep things locked in * => must be undone with pmap_unmap_ptes before returning */