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

From: Tian, Kevin
Date: Tue Sep 26 2023 - 01:33:46 EST


> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> 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.