Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

From: Jason Gunthorpe
Date: Wed Dec 06 2023 - 13:33:07 EST


On Fri, Nov 17, 2023 at 05:07:13AM -0800, Yi Liu wrote:
> +/**
> + * struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE)
> + * @size: sizeof(struct iommu_hwpt_invalidate)
> + * @hwpt_id: HWPT ID of a nested HWPT for cache invalidation
> + * @reqs_uptr: User pointer to an array having @req_num of cache invalidation
> + * requests. The request entries in the array are of fixed width
> + * @req_len, and contain a user data structure for invalidation
> + * request specific to the given hardware page table.
> + * @req_type: One of enum iommu_hwpt_data_type, defining the data type of all
> + * the entries in the invalidation request array. It should suit
> + * with the data_type passed per the allocation of the hwpt pointed
> + * by @hwpt_id.
> + * @req_len: Length (in bytes) of a request entry in the request array
> + * @req_num: Input the number of cache invalidation requests in the array.
> + * Output the number of requests successfully handled by kernel.
> + * @out_driver_error_code: Report a driver speicifc error code upon failure.
> + * It's optional, driver has a choice to fill it or
> + * not.

"specific"

Jason