Re: [PATCH v7 2/9] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-25 Thread Yi Liu
On 2023/12/22 11:19, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, December 21, 2023 11:40 PM + +int iommufd_hwpt_invalidate(struct iommufd_ucmd *ucmd) +{ + struct iommu_hwpt_invalidate *cmd = ucmd->cmd; + struct iommu_user_data_array data_array = { + .type = cmd->

RE: [PATCH v7 2/9] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-21 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Thursday, December 21, 2023 11:40 PM > + > +int iommufd_hwpt_invalidate(struct iommufd_ucmd *ucmd) > +{ > + struct iommu_hwpt_invalidate *cmd = ucmd->cmd; > + struct iommu_user_data_array data_array = { > + .type = cmd->req_type, > + .uptr

[PATCH v7 2/9] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-12-21 Thread Yi Liu
In nested translation, the stage-1 page table is user-managed but cached by the IOMMU hardware, so an update on present page table entries in the stage-1 page table should be followed with a cache invalidation. Add an IOMMU_HWPT_INVALIDATE ioctl to support such a cache invalidation. It takes hwpt_