linux/drivers/iommu/iommufd
Yi Liu 8c6eabae38 iommufd: Add IOMMU_HWPT_INVALIDATE
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_id to specify the iommu_domain, and a multi-entry array to
support multiple invalidation data in one ioctl.

enum iommu_hwpt_invalidate_data_type is defined to tag the data type of
the entries in the multi-entry array.

Link: https://lore.kernel.org/r/20240111041015.47920-3-yi.l.liu@intel.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Co-developed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2024-01-11 12:55:04 -04:00
..
device.c iommufd: Add iommufd_ctx to iommufd_put_object() 2023-11-29 20:30:03 -04:00
double_span.h
hw_pagetable.c iommufd: Add IOMMU_HWPT_INVALIDATE 2024-01-11 12:55:04 -04:00
io_pagetable.c iommufd: Add iopt_area_alloc() 2023-10-30 11:36:04 -03:00
io_pagetable.h
ioas.c iommufd: Add iommufd_ctx to iommufd_put_object() 2023-11-29 20:30:03 -04:00
iommufd_private.h iommufd: Add IOMMU_HWPT_INVALIDATE 2024-01-11 12:55:04 -04:00
iommufd_test.h iommufd/selftest: Add nested domain allocation for mock domain 2023-10-26 11:15:57 -03:00
iova_bitmap.c iommufd/iova_bitmap: Move symbols to IOMMUFD namespace 2023-10-24 11:58:42 -03:00
Kconfig vfio: Compile vfio_group infrastructure optionally 2023-07-25 10:20:50 -06:00
main.c iommufd: Add IOMMU_HWPT_INVALIDATE 2024-01-11 12:55:04 -04:00
Makefile vfio: Move iova_bitmap into iommufd 2023-10-24 11:58:42 -03:00
pages.c iommufd: Add iopt_area_alloc() 2023-10-30 11:36:04 -03:00
selftest.c iommufd: Add iommufd_ctx to iommufd_put_object() 2023-11-29 20:30:03 -04:00
vfio_compat.c iommufd: Add iommufd_ctx to iommufd_put_object() 2023-11-29 20:30:03 -04:00