Lines Matching refs:svmd

115 	segvmm_data_t *svmd = seg->s_data;  in segvmm_invalidate()  local
121 ASSERT3P(svmd->svmd_vmo, ==, NULL); in segvmm_invalidate()
127 const uintptr_t start = MAX(gpa, svmd->svmd_off); in segvmm_invalidate()
128 const uintptr_t end = MIN(gpa + sz, svmd->svmd_off + seg->s_size); in segvmm_invalidate()
132 ASSERT(start >= svmd->svmd_off && end <= svmd->svmd_off + seg->s_size); in segvmm_invalidate()
134 const caddr_t unload_va = seg->s_base + (start - svmd->svmd_off); in segvmm_invalidate()
186 segvmm_data_t *svmd = seg->s_data; in segvmm_dup() local
193 newsvmd->svmd_off = svmd->svmd_off; in segvmm_dup()
194 newsvmd->svmd_prot = svmd->svmd_prot; in segvmm_dup()
199 if (svmd->svmd_vmo != NULL) { in segvmm_dup()
201 vm_object_reference(svmd->svmd_vmo); in segvmm_dup()
202 newsvmd->svmd_vmo = svmd->svmd_vmo; in segvmm_dup()
206 newsvmd->svmd_vmc = vmc_clone(svmd->svmd_vmc); in segvmm_dup()
227 segvmm_data_t *svmd = seg->s_data; in segvmm_unmap() local
235 if (svmd->svmd_softlockcnt != 0) { in segvmm_unmap()
249 segvmm_data_t *svmd = seg->s_data; in segvmm_free() local
251 ASSERT(svmd != NULL); in segvmm_free()
253 if (svmd->svmd_vmo != NULL) { in segvmm_free()
255 vm_object_release(svmd->svmd_vmo); in segvmm_free()
256 svmd->svmd_vmo = NULL; in segvmm_free()
258 vmc_destroy(svmd->svmd_vmc); in segvmm_free()
259 svmd->svmd_vmc = NULL; in segvmm_free()
261 rw_destroy(&svmd->svmd_lock); in segvmm_free()
262 VERIFY(svmd->svmd_softlockcnt == 0); in segvmm_free()
263 kmem_free(svmd, sizeof (*svmd)); in segvmm_free()
270 segvmm_data_t *svmd = seg->s_data; in segvmm_fault_obj() local
272 const int prot = svmd->svmd_prot; in segvmm_fault_obj()
274 vm_object_t *vmo = svmd->svmd_vmo; in segvmm_fault_obj()
279 uintptr_t off = va - (uintptr_t)seg->s_base + svmd->svmd_off; in segvmm_fault_obj()
300 segvmm_data_t *svmd = seg->s_data; in segvmm_fault_space() local
302 const int prot = svmd->svmd_prot; in segvmm_fault_space()
304 vm_client_t *vmc = svmd->svmd_vmc; in segvmm_fault_space()
309 uintptr_t off = va - (uintptr_t)seg->s_base + svmd->svmd_off; in segvmm_fault_space()
348 segvmm_data_t *svmd = seg->s_data; in segvmm_fault() local
362 rw_enter(&svmd->svmd_lock, RW_WRITER); in segvmm_fault()
363 VERIFY(svmd->svmd_softlockcnt >= plen); in segvmm_fault()
364 svmd->svmd_softlockcnt -= plen; in segvmm_fault()
365 rw_exit(&svmd->svmd_lock); in segvmm_fault()
370 rw_enter(&svmd->svmd_lock, RW_WRITER); in segvmm_fault()
372 if (svmd->svmd_vmo != NULL) { in segvmm_fault()
378 size_t nval = svmd->svmd_softlockcnt + btop(len); in segvmm_fault()
380 if (svmd->svmd_softlockcnt >= nval) { in segvmm_fault()
381 rw_exit(&svmd->svmd_lock); in segvmm_fault()
384 svmd->svmd_softlockcnt = nval; in segvmm_fault()
387 rw_exit(&svmd->svmd_lock); in segvmm_fault()
413 segvmm_data_t *svmd = seg->s_data; in segvmm_checkprot() local
418 rw_enter(&svmd->svmd_lock, RW_READER); in segvmm_checkprot()
419 if ((svmd->svmd_prot & prot) != prot) { in segvmm_checkprot()
422 rw_exit(&svmd->svmd_lock); in segvmm_checkprot()
464 segvmm_data_t *svmd = seg->s_data; in segvmm_getprot() local
470 rw_enter(&svmd->svmd_lock, RW_READER); in segvmm_getprot()
471 prot = svmd->svmd_prot; in segvmm_getprot()
472 rw_exit(&svmd->svmd_lock); in segvmm_getprot()
556 segvmm_data_t *svmd = seg->s_data; in segvmm_getmemid() local
558 memidp->val[0] = (uintptr_t)svmd->svmd_vmo; in segvmm_getmemid()
559 memidp->val[1] = (uintptr_t)(addr - seg->s_base) + svmd->svmd_off; in segvmm_getmemid()