Introduce default domains for iommu groups
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest22 patches 12 repliesIn review
- v1 RFC5 patches 10 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/22 | iommu: Remove function name from pr_fmt()drivers/ | +1 | 0 replies | |
| 2/22 | iommu: Add a few printk messages to group handling codedrivers/ | +9 | 0 replies | |
| 3/22 | iommu: Propagate error in add_iommu_groupdrivers/ | +1 | 4 replies | |
| 4/22 | iommu: Clean up after a failed bus initializationdrivers/ | +26 | 0 replies | |
| 5/22 | iommu: Call remove_device call-back after driver releasedrivers/ | +1 | 0 replies | |
| 6/22 | iommu: Allocate a default domain for iommu groupsdrivers/ | +28 | 2 replies | |
| 7/22 | iommu: Limit iommu_attach/detach_device to devices with their own groupdrivers/ | +67 | 0 replies | |
| 8/22 | iommu: Make sure a device is always attached to a domaindrivers/ | +75 | 1 reply | |
| 9/22 | iommu: Add iommu_get_domain_for_dev functiondrivers/ include/ | +24 | 0 replies | |
| 10/22 | iommu: Introduce direct mapped region handlingdrivers/ include/ | +47 | 3 replies | |
| 11/22 | iommu: Create direct mappings in default domainsdrivers/ | +48 | 0 replies | |
| 12/22 | iommu: Add function to query the default domain of a groupdrivers/ include/ | +6 | 0 replies | |
| 13/22 | iommu: Introduce iommu_request_dm_for_dev()drivers/ include/ | +58 | 0 replies | |
| 14/22 | iommu/amd: Implement dm_region call-backsdrivers/ | +37 | 0 replies | |
| 15/22 | iommu/amd: Use default domain if available for DMA-APIdrivers/ | +7 | 0 replies | |
| 16/22 | iommu/amd: Implement add_device and remove_devicedrivers/ drivers/ | +63 | 0 replies | |
| 17/22 | iommu/amd: Support IOMMU_DOMAIN_DMA type allocationdrivers/ drivers/ | +73 | 0 replies | |
| 18/22 | iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocationdrivers/ | +7 | 0 replies | |
| 19/22 | iommu/amd: Put IOMMUv2 devices in a direct mapped domaindrivers/ | +14 | 0 replies | |
| 20/22 | iommu/amd: Get rid of device_dma_ops_init()drivers/ | +1 | 0 replies | |
| 21/22 | iommu/amd: Remove unused fields from struct dma_ops_domaindrivers/ drivers/ | +0 | 0 replies | |
| 22/22 | iommu/amd: Propagate errors from amd_iommu_init_apidrivers/ drivers/ drivers/ | +6 | 0 replies |
Reviews trailers per patch
None of the 22 patches has a Reviewed-by or Acked-by.
| Patch | Heiko Stuebner |
|---|---|
| 1/22 | |
| 2/22 | |
| 3/22 | T-b |
| 4/22 | |
| 5/22 | |
| 6/22 | |
| 7/22 | |
| 8/22 | |
| 9/22 | |
| 10/22 | |
| 11/22 | |
| 12/22 | |
| 13/22 | |
| 14/22 | |
| 15/22 | |
| 16/22 | |
| 17/22 | |
| 18/22 | |
| 19/22 | |
| 20/22 | |
| 21/22 | |
| 22/22 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/22 v2] Introduce default domains for iommu groups
Hi,
here is the second version of my patch-set to introduce default domains into the iommu core. This time it has a lot more patches, mostly because I added a proof of concept implementation by converting the AMD IOMMU driver to make use of it.
Converting the first driver to the new concept triggered a lot of changes and extensions in the patch-set to fit all the needs of a more complex iommu driver. Converting other drivers might need further changes, but that is something for the future.
A major change is that now the default domain has to be allocated by the code that allocates the iommu group. For PCI devices this happens in the IOMMU core, but drivers allocating the group on their own can now implement a policy that fits their needs (e.g. not allocate one domain per group but let multiple groups share one domain).
The new core code is changed in a way to stay compatible with the old behavior. All IOMMU drivers that are not yet converted to default domains should behave as without this patch-set.
I tested the patches on AMD systems with IOMMUv1 and IOMMUv2, did boot-testing and also successfully tested device assignment. I did the same tests on an Intel VT-d machine to make sure the changes do not introduce regressions on unconverted drivers.
If you prefer a git branch for testing, please look here:
git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git iommu-default-domains
Any feedback and further testing welcome!
Thanks,
Joerg
Joerg Roedel (22):
iommu: Remove function name from pr_fmt()
iommu: Add a few printk messages to group handling code
iommu: Propagate error in add_iommu_group
iommu: Clean up after a failed bus initialization
iommu: Call remove_device call-back after driver release
iommu: Allocate a default domain for iommu groups
iommu: Limit iommu_attach/detach_device to devices with their own
group
iommu: Make sure a device is always attached to a domain
iommu: Add iommu_get_domain_for_dev function
iommu: Introduce direct mapped region handling
iommu: Create direct mappings in default domains
iommu: Add function to query the default domain of a group
iommu: Introduce iommu_request_dm_for_dev()
iommu/amd: Implement dm_region call-backs
iommu/amd: Use default domain if available for DMA-API iommu/amd: Implement add_device and remove_device iommu/amd: Support IOMMU_DOMAIN_DMA type allocation iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocation iommu/amd: Put IOMMUv2 devices in a direct mapped domain iommu/amd: Get rid of device_dma_ops_init()
iommu/amd: Remove unused fields from struct dma_ops_domain iommu/amd: Propagate errors from amd_iommu_init_api
drivers/iommu/amd_iommu.c | 568 ++++++++++++---------------------------- drivers/iommu/amd_iommu_init.c | 34 +-- drivers/iommu/amd_iommu_proto.h | 2 +- drivers/iommu/amd_iommu_types.h | 11 - drivers/iommu/iommu.c | 369 ++++++++++++++++++++++++-- include/linux/iommu.h | 44 ++++ 6 files changed, 562 insertions(+), 466 deletions(-)
Signature · 1 line
1.9.1