summaryrefslogtreecommitdiffstats
path: root/tools/thermal
diff options
context:
space:
mode:
authorJean-Philippe Brucker2019-04-10 17:15:16 +0200
committerJoerg Roedel2019-04-11 17:08:52 +0200
commit26b25a2b98e45aeb40eedcedc586ad5034cbd984 (patch)
tree267d8417e78f528e7a5e1b342561359737225e04 /tools/thermal
parentiommu: Add APIs for multiple domains per device (diff)
downloadkernel-qcow2-linux-26b25a2b98e45aeb40eedcedc586ad5034cbd984.tar.gz
kernel-qcow2-linux-26b25a2b98e45aeb40eedcedc586ad5034cbd984.tar.xz
kernel-qcow2-linux-26b25a2b98e45aeb40eedcedc586ad5034cbd984.zip
iommu: Bind process address spaces to devices
Add bind() and unbind() operations to the IOMMU API. iommu_sva_bind_device() binds a device to an mm, and returns a handle to the bond, which is released by calling iommu_sva_unbind_device(). Each mm bound to devices gets a PASID (by convention, a 20-bit system-wide ID representing the address space), which can be retrieved with iommu_sva_get_pasid(). When programming DMA addresses, device drivers include this PASID in a device-specific manner, to let the device access the given address space. Since the process memory may be paged out, device and IOMMU must support I/O page faults (e.g. PCI PRI). Using iommu_sva_set_ops(), device drivers provide an mm_exit() callback that is called by the IOMMU driver if the process exits before the device driver called unbind(). In mm_exit(), device driver should disable DMA from the given context, so that the core IOMMU can reallocate the PASID. Whether the process exited or nor, the device driver should always release the handle with unbind(). To use these functions, device driver must first enable the IOMMU_DEV_FEAT_SVA device feature with iommu_dev_enable_feature(). Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/thermal')
0 files changed, 0 insertions, 0 deletions