Add set_dev_data and unset_dev_data support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 0 repliesNew
- v4 RFC4 patches 0 repliesSuperseded
- v3 RFC4 patches 2 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 RFC | 3 patches | 11 replies | Superseded | |
| v1 RFC | 3 patches | 0 replies | Superseded |
Changes in v5 from the cover letter
* Renamed ioctls to IOMMU_SET_DEV_DATA and IOMMU_UNSET_DEV_DATA
* Renamed data structs to iommu_set_dev_data and IOMMU_UNSET_DEV_DATA
* Added missing TEST_LENGTH for those two new data structures
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iommu: Add set/unset_dev_user_data opsinclude/ | +13 | 0 replies | |
| 2/4 | iommufd: Add IOMMUFD_CMD_SET_DEV_DATA and IOMMUFD_CMD_UNSET_DEV_DATAdrivers/ drivers/ drivers/ +1 more | +120 | 0 replies | |
| 3/4 | iommufd/selftest: Add IOMMU_TEST_OP_DEV_CHECK_DATAdrivers/ drivers/ | +57 | 0 replies | |
| 4/4 | iommufd/selftest: Add coverage for IOMMU_SET/UNSET_DEV_DATAtools/ tools/ | +81 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/4] Add set_dev_data and unset_dev_data support
Changelog
v5:
* Renamed ioctls to IOMMU_SET_DEV_DATA and IOMMU_UNSET_DEV_DATA
* Renamed data structs to iommu_set_dev_data and IOMMU_UNSET_DEV_DATA
* Added missing TEST_LENGTH for those two new data structures
v4:
https://lore.kernel.org/all/[email protected]/
* Rebased on top of v6.4-rc1, and iommufd_nesting-v2 (candidate)
* Dropped WARN_ON in the destroy()
v3:
https://lore.kernel.org/all/[email protected]/
* Reverted the data in VFIO BIND ioctl to a set of new iommufd ioctls
* Replaced the iommu_device_data_size array with a dev_user_data_len variable in the iommu_ops structure.
* Added has_dev_data check and locking protection
* Added selftest coverage
v2:
https://lore.kernel.org/all/[email protected]/
* Integrated the uAPI into VFIO_DEVICE_BIND_IOMMUFD call
* Renamed the previous set_rid_user to set_dev_data, to decouple from the PCI regime.
v1:
https://lore.kernel.org/all/[email protected]/
This is a pair of new uAPI/ops for user space to set an iommu specific device data for a passthrough device. This is primarily used by SMMUv3 driver for now, to link the vSID and the pSID of a device that's behind the SMMU. The link (lookup table) will be used to verify any ATC_INV command from the user space for that device, and then replace the SID field (virtual SID) with the corresponding physical SID.
This series is available on Github:
https://github.com/nicolinc/iommufd/commits/set_dev_data-v5
Thanks!
Nicolin
Nicolin Chen (4):
iommu: Add set/unset_dev_user_data ops
iommufd: Add IOMMUFD_CMD_SET_DEV_DATA and IOMMUFD_CMD_UNSET_DEV_DATA iommufd/selftest: Add IOMMU_TEST_OP_DEV_CHECK_DATA iommufd/selftest: Add coverage for IOMMU_SET/UNSET_DEV_DATA
drivers/iommu/iommufd/device.c | 2 + drivers/iommu/iommufd/iommufd_private.h | 1 + drivers/iommu/iommufd/iommufd_test.h | 15 ++++ drivers/iommu/iommufd/main.c | 85 +++++++++++++++++++ drivers/iommu/iommufd/selftest.c | 42 +++++++++ include/linux/iommu.h | 13 +++ include/uapi/linux/iommufd.h | 32 +++++++ tools/testing/selftests/iommu/iommufd.c | 22 +++++ tools/testing/selftests/iommu/iommufd_utils.h | 59 +++++++++++++ 9 files changed, 271 insertions(+)
Signature · 1 line
2.41.0