diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-05-11 01:42:12 -0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-05-23 08:15:57 +0200 |
commit | d99be00f42eac9fc35a164f3f6c8c7a56b295aa9 (patch) | |
tree | a0575f349e1f37c65ccac10d53e257045e4a7450 /CREDITS | |
parent | fcbb0a4d738ce3ccc06d2c73ba227cce5094d885 (diff) | |
download | lwn-d99be00f42eac9fc35a164f3f6c8c7a56b295aa9.tar.gz lwn-d99be00f42eac9fc35a164f3f6c8c7a56b295aa9.zip |
iommu: Consolidate the default_domain setup to one function
Make iommu_change_dev_def_domain() general enough to setup the initial
default_domain or replace it with a new default_domain. Call the new
function iommu_setup_default_domain() and make it the only place in the
code that stores to group->default_domain.
Consolidate the three copies of the default_domain setup sequence. The flow
flow requires:
- Determining the domain type to use
- Checking if the current default domain is the same type
- Allocating a domain
- Doing iommu_create_device_direct_mappings()
- Attaching it to devices
- Store group->default_domain
This adjusts the domain allocation from the prior patch to be able to
detect if each of the allocation steps is already the domain we already
have, which is a more robust version of what change default domain was
already doing.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/14-v5-1b99ae392328+44574-iommu_err_unwind_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions