aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2019-10-02 12:42:42 -0700
committerJoerg Roedel <jroedel@suse.de>2019-10-15 13:34:25 +0200
commite5c0bd7f2206cd288029edb6afbfde93c73b4048 (patch)
treec0f51148699d7ecbc1ca652ca6281debe7980eae /include/linux/iommu.h
parentiommu: Add I/O ASID allocator (diff)
downloadwireguard-linux-e5c0bd7f2206cd288029edb6afbfde93c73b4048.tar.xz
wireguard-linux-e5c0bd7f2206cd288029edb6afbfde93c73b4048.zip
iommu/ioasid: Add custom allocators
IOASID allocation may rely on platform specific methods. One use case is that when running in the guest, in order to obtain system wide global IOASIDs, emulated allocation interface is needed to communicate with the host. Here we call these platform specific allocators custom allocators. Custom IOASID allocators can be registered at runtime and take precedence over the default XArray allocator. They have these attributes: - provides platform specific alloc()/free() functions with private data. - allocation results lookup are not provided by the allocator, lookup request must be done by the IOASID framework by its own XArray. - allocators can be unregistered at runtime, either fallback to the next custom allocator or to the default allocator. - custom allocators can share the same set of alloc()/free() helpers, in this case they also share the same IOASID space, thus the same XArray. - switching between allocators requires all outstanding IOASIDs to be freed unless the two allocators share the same alloc()/free() helpers. Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.com> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Link: https://lkml.org/lkml/2019/4/26/462 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 'include/linux/iommu.h')
0 files changed, 0 insertions, 0 deletions