Lines Matching refs:ucmd
226 static int iommufd_destroy(struct iommufd_ucmd *ucmd) in iommufd_destroy() argument
228 struct iommu_destroy *cmd = ucmd->cmd; in iommufd_destroy()
230 return iommufd_object_remove(ucmd->ictx, NULL, cmd->id, 0); in iommufd_destroy()
294 static int iommufd_option(struct iommufd_ucmd *ucmd) in iommufd_option() argument
296 struct iommu_option *cmd = ucmd->cmd; in iommufd_option()
304 rc = iommufd_option_rlimit_mode(cmd, ucmd->ictx); in iommufd_option()
307 rc = iommufd_ioas_option(ucmd); in iommufd_option()
314 if (copy_to_user(&((struct iommu_option __user *)ucmd->ubuffer)->val64, in iommufd_option()
345 int (*execute)(struct iommufd_ucmd *ucmd);
397 struct iommufd_ucmd ucmd = {}; in iommufd_fops_ioctl() local
407 ucmd.ictx = ictx; in iommufd_fops_ioctl()
408 ucmd.ubuffer = (void __user *)arg; in iommufd_fops_ioctl()
409 ret = get_user(ucmd.user_size, (u32 __user *)ucmd.ubuffer); in iommufd_fops_ioctl()
416 if (ucmd.user_size < op->min_size) in iommufd_fops_ioctl()
419 ucmd.cmd = &buf; in iommufd_fops_ioctl()
420 ret = copy_struct_from_user(ucmd.cmd, op->size, ucmd.ubuffer, in iommufd_fops_ioctl()
421 ucmd.user_size); in iommufd_fops_ioctl()
424 ret = op->execute(&ucmd); in iommufd_fops_ioctl()