Lines Matching refs:umem
107 struct vduse_umem *umem; member
943 if (!dev->umem) in vduse_dev_dereg_umem()
947 if (dev->umem->iova != iova || size != dev->domain->bounce_size) in vduse_dev_dereg_umem()
951 unpin_user_pages_dirty_lock(dev->umem->pages, in vduse_dev_dereg_umem()
952 dev->umem->npages, true); in vduse_dev_dereg_umem()
953 atomic64_sub(dev->umem->npages, &dev->umem->mm->pinned_vm); in vduse_dev_dereg_umem()
954 mmdrop(dev->umem->mm); in vduse_dev_dereg_umem()
955 vfree(dev->umem->pages); in vduse_dev_dereg_umem()
956 kfree(dev->umem); in vduse_dev_dereg_umem()
957 dev->umem = NULL; in vduse_dev_dereg_umem()
968 struct vduse_umem *umem = NULL; in vduse_dev_reg_umem() local
980 if (dev->umem) in vduse_dev_reg_umem()
987 umem = kzalloc(sizeof(*umem), GFP_KERNEL); in vduse_dev_reg_umem()
988 if (!page_list || !umem) in vduse_dev_reg_umem()
1011 umem->pages = page_list; in vduse_dev_reg_umem()
1012 umem->npages = pinned; in vduse_dev_reg_umem()
1013 umem->iova = iova; in vduse_dev_reg_umem()
1014 umem->mm = current->mm; in vduse_dev_reg_umem()
1017 dev->umem = umem; in vduse_dev_reg_umem()
1026 kfree(umem); in vduse_dev_reg_umem()
1205 struct vduse_iova_umem umem; in vduse_dev_ioctl() local
1208 if (copy_from_user(&umem, argp, sizeof(umem))) in vduse_dev_ioctl()
1212 if (!is_mem_zero((const char *)umem.reserved, in vduse_dev_ioctl()
1213 sizeof(umem.reserved))) in vduse_dev_ioctl()
1216 ret = vduse_dev_reg_umem(dev, umem.iova, in vduse_dev_ioctl()
1217 umem.uaddr, umem.size); in vduse_dev_ioctl()
1221 struct vduse_iova_umem umem; in vduse_dev_ioctl() local
1224 if (copy_from_user(&umem, argp, sizeof(umem))) in vduse_dev_ioctl()
1228 if (!is_mem_zero((const char *)umem.reserved, in vduse_dev_ioctl()
1229 sizeof(umem.reserved))) in vduse_dev_ioctl()
1232 ret = vduse_dev_dereg_umem(dev, umem.iova, in vduse_dev_ioctl()
1233 umem.size); in vduse_dev_ioctl()