Re: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-12-11 Thread Yi Liu
On 2023/12/7 02:56, Jason Gunthorpe wrote: On Fri, Nov 17, 2023 at 05:18:16AM -0800, Yi Liu wrote: +static int intel_nested_cache_invalidate_user(struct iommu_domain *domain, + struct iommu_user_data_array *array, +

Re: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-12-11 Thread Yi Liu
On 2023/11/20 16:32, Tian, Kevin wrote: From: Liu, Yi L Sent: Friday, November 17, 2023 9:18 PM + + if (inv_info.__reserved || (inv_info.flags & ~IOMMU_VTD_INV_FLAGS_LEAF) || + !IS_ALIGNED(inv_info.addr, VTD_PAGE_SIZE)) { + ret = -EINVAL; +

Re: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-12-06 Thread Jason Gunthorpe
On Fri, Nov 17, 2023 at 05:18:16AM -0800, Yi Liu wrote: > +static int intel_nested_cache_invalidate_user(struct iommu_domain *domain, > + struct iommu_user_data_array > *array, > + u32 *cerror_idx) > +{ > + str

RE: [PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-11-20 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Friday, November 17, 2023 9:18 PM > + > + if (inv_info.__reserved || (inv_info.flags & > ~IOMMU_VTD_INV_FLAGS_LEAF) || > + !IS_ALIGNED(inv_info.addr, VTD_PAGE_SIZE)) { > + ret = -EINVAL; > + break; > +

[PATCH v7 3/3] iommu/vt-d: Add iotlb flush for nested domain

2023-11-17 Thread Yi Liu
This implements the .cache_invalidate_user() callback to support iotlb flush for nested domain. Signed-off-by: Lu Baolu Signed-off-by: Yi Liu --- drivers/iommu/intel/nested.c | 54 1 file changed, 54 insertions(+) diff --git a/drivers/iommu/intel/nested.c b