[PATCH v4 3/7] iommu/arm-smmu-v3: Add support for domain_alloc_user fn

Jason Gunthorpe jgg at nvidia.com
Sat Jun 1 14:08:25 PDT 2024


On Tue, May 28, 2024 at 08:18:27AM +0100, Shameer Kolothum wrote:
> @@ -2715,6 +2717,34 @@ static struct iommu_domain arm_smmu_blocked_domain = {
>  	.ops = &arm_smmu_blocked_ops,
>  };
>  
> +static struct iommu_domain *
> +arm_smmu_domain_alloc_user(struct device *dev, u32 flags,
> +			   struct iommu_domain *parent,
> +			   const struct iommu_user_data *user_data)
> +{
> +	struct arm_smmu_master *master = dev_iommu_priv_get(dev);
> +	struct arm_smmu_domain *smmu_domain;
> +	int ret;
> +
> +	if (flags || parent || user_data)
> +		return ERR_PTR(-EINVAL);

This should be EOPNOTSUPP, and same in the following patch that
touches this.

Otherwise looks good

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Jason



More information about the linux-arm-kernel mailing list