diff options
author | Sai Praneeth Prakhya <[email protected]> | 2020-04-29 15:36:40 +0200 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2020-05-05 14:36:12 +0200 |
commit | 4cbf38511a007867def958872203ae8adb8e2351 (patch) | |
tree | eea8c33e8fcef1723f837208c81e9be570b9e20f /lib/mpi/mpi-mul.c | |
parent | ff2a08b39bcede1b08d84d8b5c8ee1336a39c5df (diff) |
iommu: Add def_domain_type() callback in iommu_ops
Some devices are reqired to use a specific type (identity or dma)
of default domain when they are used with a vendor iommu. When the
system level default domain type is different from it, the vendor
iommu driver has to request a new default domain with
iommu_request_dma_domain_for_dev() and iommu_request_dm_for_dev()
in the add_dev() callback. Unfortunately, these two helpers only
work when the group hasn't been assigned to any other devices,
hence, some vendor iommu driver has to use a private domain if
it fails to request a new default one.
This adds def_domain_type() callback in the iommu_ops, so that
any special requirement of default domain for a device could be
aware by the iommu generic layer.
Signed-off-by: Sai Praneeth Prakhya <[email protected]>
Signed-off-by: Lu Baolu <[email protected]>
[ [email protected]: Added iommu_get_def_domain_type() function and use
it to allocate the default domain ]
Co-developed-by: Joerg Roedel <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Acked-by: Marek Szyprowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions