Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iommufd: Add vfio_group_set/unset_iommufd helpers
IOMMUFD has VFIO compatibility so user space can open /dev/iommu to reuse existing VFIO IOMMU ioctls. Typically, /dev/vfio/vfio can be a symlink to /dev/iommu. However, the group_fd used for VFIO_GROUP_SET/UNSET_CONTAINER is still a VFIO thing and is not supported using new IOMMUFD ioctls, which go for an approach of attaching and dettaching a VFIO device directly instead of a VFIO group. In order to fill this gap, this patch adds a pair of helpers for VFIO to call, so as to bind/unbind all devices in the VFIO group to/from the iommufd and to attach/detach them to/from the ioas. Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com>
- Loading branch information
Showing
3 changed files
with
116 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters