Lines Matching refs:object
195 sgx_insert_epc_page_by_index(vm_page_t page, vm_object_t object, in sgx_insert_epc_page_by_index() argument
199 VM_OBJECT_ASSERT_WLOCKED(object); in sgx_insert_epc_page_by_index()
202 vm_page_iter_insert(page, object, pidx, pages); in sgx_insert_epc_page_by_index()
206 sgx_va_slot_init_by_index(struct sgx_softc *sc, vm_object_t object, in sgx_va_slot_init_by_index() argument
214 VM_OBJECT_ASSERT_WLOCKED(object); in sgx_va_slot_init_by_index()
230 sgx_insert_epc_page_by_index(page, object, idx, pages); in sgx_va_slot_init_by_index()
242 vm_object_t object; in sgx_va_slot_init() local
245 object = enclave->object; in sgx_va_slot_init()
247 VM_OBJECT_ASSERT_WLOCKED(object); in sgx_va_slot_init()
252 ret = sgx_va_slot_init_by_index(sc, object, idx, pages); in sgx_va_slot_init()
263 vm_object_t object; in sgx_mem_find() local
274 object = entry->object.vm_object; in sgx_mem_find()
275 if (object == NULL || object->handle == NULL) { in sgx_mem_find()
280 if (object->type != OBJT_MGTDEVICE || in sgx_mem_find()
281 object->un_pager.devp.ops != &sgx_pg_ops) { in sgx_mem_find()
286 vm_object_reference(object); in sgx_mem_find()
288 *object0 = object; in sgx_mem_find()
302 vm_object_t object; in sgx_enclave_find() local
305 ret = sgx_mem_find(sc, addr, &entry, &object); in sgx_enclave_find()
309 vmh = object->handle; in sgx_enclave_find()
311 vm_object_deallocate(object); in sgx_enclave_find()
316 if (enclave == NULL || enclave->object == NULL) { in sgx_enclave_find()
317 vm_object_deallocate(object); in sgx_enclave_find()
382 vm_object_t object; in sgx_enclave_remove() local
389 object = enclave->object; in sgx_enclave_remove()
391 vm_page_iter_init(&pages, object); in sgx_enclave_remove()
392 VM_OBJECT_WLOCK(object); in sgx_enclave_remove()
408 p_secs = vm_page_grab(object, SGX_SECS_VM_OBJECT_INDEX, in sgx_enclave_remove()
414 KASSERT(object->resident_page_count == 0, ("count")); in sgx_enclave_remove()
416 VM_OBJECT_WUNLOCK(object); in sgx_enclave_remove()
593 sgx_pg_fault(vm_object_t object, vm_ooffset_t offset, in sgx_pg_fault() argument
628 VM_OBJECT_ASSERT_WLOCKED(enclave->object); in sgx_insert_epc_page()
633 sgx_insert_epc_page_by_index(page, enclave->object, pidx, pages); in sgx_insert_epc_page()
648 vm_object_t object; in sgx_ioctl_create() local
655 object = NULL; in sgx_ioctl_create()
671 ret = sgx_mem_find(sc, secs->base, &entry, &object); in sgx_ioctl_create()
677 vmh = object->handle; in sgx_ioctl_create()
693 enclave->object = object; in sgx_ioctl_create()
710 vm_page_iter_init(&pages, object); in sgx_ioctl_create()
711 VM_OBJECT_WLOCK(object); in sgx_ioctl_create()
714 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_create()
720 ret = sgx_va_slot_init_by_index(sc, object, in sgx_ioctl_create()
723 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_create()
732 p = vm_page_grab(enclave->object, in sgx_ioctl_create()
736 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_create()
746 p = vm_page_grab(enclave->object, in sgx_ioctl_create()
750 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_create()
760 sgx_insert_epc_page_by_index(page, enclave->object, in sgx_ioctl_create()
763 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_create()
766 vm_object_deallocate(object); in sgx_ioctl_create()
776 vm_object_deallocate(object); in sgx_ioctl_create()
792 vm_object_t object; in sgx_ioctl_add_page() local
803 object = NULL; in sgx_ioctl_add_page()
812 object = enclave->object; in sgx_ioctl_add_page()
813 KASSERT(object != NULL, ("vm object is NULL\n")); in sgx_ioctl_add_page()
814 vmh = object->handle; in sgx_ioctl_add_page()
857 vm_page_iter_init(&pages, object); in sgx_ioctl_add_page()
858 VM_OBJECT_WLOCK(object); in sgx_ioctl_add_page()
861 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_add_page()
869 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_add_page()
886 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_add_page()
895 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_add_page()
901 VM_OBJECT_WUNLOCK(object); in sgx_ioctl_add_page()
904 vm_object_deallocate(object); in sgx_ioctl_add_page()
913 vm_object_deallocate(object); in sgx_ioctl_add_page()
927 vm_object_t object; in sgx_ioctl_init() local
933 object = NULL; in sgx_ioctl_init()
945 object = enclave->object; in sgx_ioctl_init()
985 vm_object_deallocate(object); in sgx_ioctl_init()