Lines Matching defs:vmh
94 * pidx = OFF_TO_IDX(addp->addr - vmh->base);
294 struct sgx_vm_handle *vmh;
304 vmh = object->handle;
305 if (vmh == NULL) {
310 enclave = vmh->enclave;
537 struct sgx_vm_handle *vmh;
539 vmh = handle;
540 if (vmh == NULL) {
541 dprintf("%s: vmh not found.\n", __func__);
545 dprintf("%s: vmh->base %lx foff 0x%lx size 0x%lx\n",
546 __func__, vmh->base, foff, size);
554 struct sgx_vm_handle *vmh;
557 vmh = handle;
558 if (vmh == NULL) {
559 dprintf("%s: vmh not found.\n", __func__);
563 sc = vmh->sc;
569 if (vmh->enclave == NULL) {
574 sgx_enclave_remove(sc, vmh->enclave);
576 free(vmh->enclave, M_SGX);
577 free(vmh, M_SGX);
631 struct sgx_vm_handle *vmh;
668 vmh = object->handle;
669 if (!vmh) {
670 dprintf("%s: Can't find vmh.\n", __func__);
677 vmh->base = (entry->start - entry->offset);
685 enclave->vmh = vmh;
747 vmh->enclave = enclave;
777 struct sgx_vm_handle *vmh;
803 vmh = object->handle;
843 addr = (addp->addr - vmh->base);
1023 struct sgx_vm_handle *vmh;
1031 vmh = malloc(sizeof(struct sgx_vm_handle),
1033 vmh->sc = sc;
1034 vmh->size = mapsize;
1035 vmh->mem = cdev_pager_allocate(vmh, OBJT_MGTDEVICE, &sgx_pg_ops,
1037 if (vmh->mem == NULL) {
1038 free(vmh, M_SGX);
1042 VM_OBJECT_WLOCK(vmh->mem);
1043 vm_object_set_flag(vmh->mem, OBJ_PG_DTOR);
1044 VM_OBJECT_WUNLOCK(vmh->mem);
1046 *objp = vmh->mem;