RE: [PATCH 5/6] iommufd/selftest: Add domain_alloc_user() support in iommu mock

Tian, Kevin
2023-09-26T05:33:43Z

> From: Liu, Yi L <yi.l.liu@intel.com>
> Sent: Tuesday, September 19, 2023 5:25 PM
>
> +static struct iommu_domain *
> +mock_domain_alloc_user(struct device *dev, u32 flags)
> +{
> + struct iommu_domain *domain;
> +
> + domain = mock_domain_alloc(IOMMU_DOMAIN_UNMANAGED);
> + if (!domain)
> + domain = ERR_PTR(-ENOMEM);
> + return domain;
> +}

this also needs to validate whether the flags bits are supported.