RE: [PATCH v2 03/11] iommufd/hw_pagetable: Use domain_alloc_user op for domain allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Yi Liu <yi.l.liu@xxxxxxxxx>
> Sent: Thursday, May 11, 2023 10:39 PM
> 
> 
> @@ -88,7 +90,10 @@ iommufd_hw_pagetable_alloc(struct iommufd_ctx
> *ictx, struct iommufd_ioas *ioas,
>  	refcount_inc(&ioas->obj.users);
>  	hwpt->ioas = ioas;
> 
> -	hwpt->domain = iommu_domain_alloc(idev->dev->bus);
> +	if (ops->domain_alloc_user)
> +		hwpt->domain = ops->domain_alloc_user(idev->dev, NULL,
> NULL);
> +	else
> +		hwpt->domain = iommu_domain_alloc(idev->dev->bus);

this reminds the comment for @domain_alloc_user() should clarify
that UNMANGED domain type is assumed when no user data is 
provided, to be compatible with iommu_domain_alloc().




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux