Re: [PATCH v3 5/5] iommu/uapi: Support both kernel and user unbind guest PASID

2020-06-25 Thread Lu Baolu
Hi Jacob, On 2020/6/24 1:03, Jacob Pan wrote: +int __iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev, + struct iommu_gpasid_bind_data *data) { if (unlikely(!domain->ops->sva_unbind_gpasid)) return -ENODEV; - return domain

Re: [PATCH v3 5/5] iommu/uapi: Support both kernel and user unbind guest PASID

2020-06-24 Thread Lu Baolu
Hi Jacob, On 2020/6/24 1:03, Jacob Pan wrote: Guest SVA unbind data can come from either kernel and user space, if a either kernel or user space user pointer is passed in, IOMMU driver must copy from data from user. copy data from user If the unbind data is assembled in kernel, data can

[PATCH v3 5/5] iommu/uapi: Support both kernel and user unbind guest PASID

2020-06-23 Thread Jacob Pan
Guest SVA unbind data can come from either kernel and user space, if a user pointer is passed in, IOMMU driver must copy from data from user. If the unbind data is assembled in kernel, data can be trusted and directly used. This patch creates a wrapper for unbind gpasid such that user pointer can b