vfio: Support IO page table replacement
authorNicolin Chen <nicolinc@nvidia.com>
Fri, 28 Jul 2023 06:33:29 +0000 (23:33 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Jul 2023 16:31:24 +0000 (13:31 -0300)
commitc157fd88619946cd62af47c45214c479749dad8d
tree20ea10c24eaa8f93163c30d1c668fb8a0a63f97d
parentc154660b6e26c3f0670a49f43f1fafa5d65f6d39
vfio: Support IO page table replacement

Now both the physical path and the emulated path can support an IO page
table replacement. Call iommufd_device_replace/iommufd_access_replace(),
when vdev->iommufd_attached is true.

Also update the VFIO_DEVICE_ATTACH_IOMMUFD_PT kdoc in the uAPI header.

Link: https://lore.kernel.org/r/b5f01956ff161f76aa52c95b0fa1ad6eaca95c4a.1690523699.git.nicolinc@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/vfio/iommufd.c
include/uapi/linux/vfio.h