iommu: Add cache_invalidate_user op
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 11 Jan 2024 04:10:08 +0000 (20:10 -0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 11 Jan 2024 16:55:04 +0000 (12:55 -0400)
commitf35b88b66fbb5c90298ce3aa483b8a2cf1f39ad0
tree050d655871efb9e1866c1eb2f9eb1ededa8a6aae
parent861deac3b092f37b2c5e6871732f3e11486f7082
iommu: Add cache_invalidate_user op

The updates of the PTEs in the nested page table will be propagated to the
hardware caches.

Add a new domain op cache_invalidate_user() for the userspace to flush the
hardware caches for a nested domain through iommufd. No wrapper for it, as
it's only supposed to be used by iommufd. Then, pass in invalidation
requests in form of a user data array containing a number of invalidation
data entries.

Link: https://lore.kernel.org/r/20240111041015.47920-2-yi.l.liu@intel.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.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>
include/linux/iommu.h