diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2019-10-02 12:42:41 -0700 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-10-15 13:34:16 +0200 |
commit | fa83433c92e340822a056a610a4fa2063a3db304 (patch) | |
tree | 86c9acdf47a699b5dc9546bb02bb58424048ed9d /drivers/iommu/Kconfig | |
parent | 4c7c171f85b261f91270d405b7c7390aa6ddfb60 (diff) | |
download | linux-stable-fa83433c92e340822a056a610a4fa2063a3db304.tar.gz linux-stable-fa83433c92e340822a056a610a4fa2063a3db304.tar.bz2 linux-stable-fa83433c92e340822a056a610a4fa2063a3db304.zip |
iommu: Add I/O ASID allocator
Some devices might support multiple DMA address spaces, in particular
those that have the PCI PASID feature. PASID (Process Address Space ID)
allows to share process address spaces with devices (SVA), partition a
device into VM-assignable entities (VFIO mdev) or simply provide
multiple DMA address space to kernel drivers. Add a global PASID
allocator usable by different drivers at the same time. Name it I/O ASID
to avoid confusion with ASIDs allocated by arch code, which are usually
a separate ID space.
The IOASID space is global. Each device can have its own PASID space,
but by convention the IOMMU ended up having a global PASID space, so
that with SVA, each mm_struct is associated to a single PASID.
The allocator is primarily used by IOMMU subsystem but in rare occasions
drivers would like to allocate PASIDs for devices that aren't managed by
an IOMMU, using the same ID space as IOMMU.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/Kconfig')
-rw-r--r-- | drivers/iommu/Kconfig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index e3842eabcfdd..fd50ddffffbf 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -3,6 +3,10 @@ config IOMMU_IOVA tristate +# The IOASID library may also be used by non-IOMMU_API users +config IOASID + tristate + # IOMMU_API always gets selected by whoever wants it. config IOMMU_API bool |