iommufd: Prepare for IOMMUFD_OBJ_HW_QUEUE
Status from this message: Applied to iommfd for-next, thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest14 patches 37 repliesApplied
- v112 patches 33 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | iommufd: Apply obvious cosmetic fixesdrivers/ drivers/ drivers/ +7 more | +27 | 1 reply | |
| 2/14 | iommufd: Drop unused ictx in struct iommufd_vdevicedrivers/ | +0 | 1 reply | |
| 3/14 | iommufd: Use enum iommu_viommu_type for type in struct iommufd_viommuinclude/ | +1 | 2 replies | |
| 4/14 | iommufd: Use enum iommu_veventq_type for type in struct iommufd_veventqdrivers/ | +3 | 2 replies | |
| 5/14 | iommufd: Return EOPNOTSUPP for failures due to driver bugsdrivers/ drivers/ | +3 | 4 replies | |
| 6/14 | iommu: Introduce get_viommu_size and viommu_init opsinclude/ include/ | +21 | 4 replies | |
| 7/14 | iommufd/viommu: Support get_viommu_size and viommu_init opsdrivers/ | +39 | 3 replies | |
| 8/14 | iommufd/selftest: Drop parent domain from mock_iommu_domain_nesteddrivers/ | +0 | 2 replies | |
| 9/14 | iommufd/selftest: Replace mock_viommu_alloc with mock_viommu_initdrivers/ | +14 | 1 reply | |
| 10/14 | iommu/arm-smmu-v3: Replace arm_vsmmu_alloc with arm_vsmmu_initdrivers/ drivers/ drivers/ | +32 | 5 replies | |
| 11/14 | iommu: Deprecate viommu_alloc opdrivers/ include/ include/ | +5 | 3 replies | |
| 12/14 | iommufd: Move _iommufd_object_alloc out of driver.cdrivers/ drivers/ drivers/ +1 more | +36 | 1 reply | |
| 13/14 | iommufd: Introduce iommufd_object_alloc_ucmd helperdrivers/ drivers/ | +51 | 5 replies | |
| 14/14 | iommufd: Apply the new iommufd_object_alloc_ucmd helperdrivers/ drivers/ | +10 | 2 replies |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Kevin Tian | Jason Gunthorpe | Lu Baolu | Will Deacon | Pranjal Shrivastava |
|---|---|---|---|---|---|
| 1/14 | R-b | R-b | R-b | ||
| 2/14 | R-b | R-b | R-b | ||
| 3/14 | R-b | R-b | R-b | R-b | |
| 4/14 | R-b | R-b | R-b | R-b | |
| 5/14 | R-b | R-b | R-b | R-b | |
| 6/14 | R-b | R-b | R-b | R-b | |
| 7/14 | R-b | R-b | R-b | ||
| 8/14 | R-b | R-b | |||
| 9/14 | R-b | R-b | |||
| 10/14 | R-b | A-b | R-b R-b | ||
| 11/14 | R-b | R-b | R-b | R-b | |
| 12/14 | R-b | R-b | R-b | ||
| 13/14 | R-b | R-b | R-b | A-b | |
| 14/14 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v2 00/14] iommufd: Prepare for IOMMUFD_OBJ_HW_QUEUE
The new HW Queue object will require more interactions with IOMMU drivers, with a few more for-driver APIs. This will complicate the driver-allocated structure design like the viommu_alloc op: since the core structure is not initialized during the driver allocation stage, a new for-driver API can't reference any member in the core vIOMMU structure.
[before]
core: viommu = ops->viommu_alloc();
driver: // my_viommu is successfully allocated
driver: my_viommu = iommufd_viommu_alloc(...);
driver: // This may crash if it reads viommu->ictx
driver: new = iommufd_new_viommu_helper(my_viommu->core ...);
core: viommu->ictx = ucmd->ictx;
core: ...
Make a preparatory series doing:
1 Replace viommu_alloc design with get_viommu_size + viommu_init 2 Add a new iommufd_object_alloc_ucmd
3 Cosmetic fixes and clean ups
[after 1]
core: viommu = ops->get_viommu_size();
driver: return VIOMMU_STRUCT_SIZE();
core: viommu->ictx = ucmd->ictx; // and others
core: rc = ops->viommu_init();
driver: // This is safe now as viommu->ictx is inited
driver: new = iommufd_new_viommu_helper(my_viommu->core ...);
core: ...
Some of the patches are included from:
[PATCH v5 00/29] iommufd: Add vIOMMU infrastructure (Part-4 HW QUEUE)
https://lore.kernel.org/all/[email protected]/
This is on Github:
https://github.com/nicolinc/iommufd/commits/iommufd_hw_queue-prep-v2
Changelog
v2
* Add Reviewed-by from Kevin and Jason
* Drop unused mock_nested->parent
* Revise commit messages and kdocs
* Add WARN_ON if new_obj is already set
* Re-organize the patches replacing viommu_alloc
* Use EOPNOTSUPP for failures due to driver bugs
* Return size_t for get_viommu_size op (0 means EOPNOTSUPP)
v1
https://lore.kernel.org/all/[email protected]/
Thanks
Nicolin
Nicolin Chen (14):
iommufd: Apply obvious cosmetic fixes
iommufd: Drop unused ictx in struct iommufd_vdevice
iommufd: Use enum iommu_viommu_type for type in struct iommufd_viommu
iommufd: Use enum iommu_veventq_type for type in struct
iommufd_veventq
iommufd: Return EOPNOTSUPP for failures due to driver bugs
iommu: Introduce get_viommu_size and viommu_init ops iommufd/viommu: Support get_viommu_size and viommu_init ops iommufd/selftest: Drop parent domain from mock_iommu_domain_nested iommufd/selftest: Replace mock_viommu_alloc with mock_viommu_init iommu/arm-smmu-v3: Replace arm_vsmmu_alloc with arm_vsmmu_init
iommu: Deprecate viommu_alloc op
iommufd: Move _iommufd_object_alloc out of driver.c
iommufd: Introduce iommufd_object_alloc_ucmd helper
iommufd: Apply the new iommufd_object_alloc_ucmd helper
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 11 ++-- drivers/iommu/iommufd/io_pagetable.h | 2 +- drivers/iommu/iommufd/iommufd_private.h | 42 ++++++++++--- include/linux/iommu.h | 26 ++++---- include/linux/iommufd.h | 39 +++--------- .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 46 +++++++------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 +- drivers/iommu/iommufd/device.c | 5 +- drivers/iommu/iommufd/driver.c | 33 ---------- drivers/iommu/iommufd/eventq.c | 14 ++--- drivers/iommu/iommufd/hw_pagetable.c | 10 ++- drivers/iommu/iommufd/io_pagetable.c | 3 +- drivers/iommu/iommufd/iova_bitmap.c | 1 - drivers/iommu/iommufd/main.c | 63 +++++++++++++++++-- drivers/iommu/iommufd/pages.c | 9 ++- drivers/iommu/iommufd/selftest.c | 56 ++++++++--------- drivers/iommu/iommufd/viommu.c | 48 +++++++++----- 17 files changed, 222 insertions(+), 189 deletions(-)
Signature · 1 line
2.43.0