diff options
| author | Deepak Nibade <dnibade@nvidia.com> | 2017-09-15 08:32:09 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-13 16:42:01 -0400 |
| commit | 11d2647af2b38fc5b40db76871d97dcfd0eec833 (patch) | |
| tree | 4c43fdc6d6c880bd7c708e199afbe26e82175afa /include/uapi/misc | |
| parent | 00f54f1ae8d0335707a26cca6ef9317ae691635c (diff) | |
video: tegra: host: enable lazy unmapping on context devices
Since context devices are a limited resource, these devices are dynamically
allocated and re-used across multiple processes
If lazy unmapping is enabled for context devices, one process can see all
the mappings of other process mapped into same context device
Hence lazy unmapping was disabled so far.
To fix this handle allocation of context devices as following
- store a unique prev_identifier into iommu_ctx
- iommu_context_dev_allocate() will receive an identifier to compare
- if same identifier is stashed into any of the free context device,
return that context device since it will have all the mappings stashed
- if not, look for a device which does not have prev_identifier set and is clean
- if no device is available without prev_identifier, pick any one of the free
device but explicitly call dma_buf_release_stash() to remove
stashed mappings
This ensures that new processes cannot see mappings of old process even if
context device is reused. And since this is handled now, enable lazy
unmapping on context devices too
Bug 1950747
Change-Id: I40bf2e05691ddf1a65646f8706d165c1538db3ae
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1560847
Reviewed-on: https://git-master.nvidia.com/r/1565250
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include/uapi/misc')
0 files changed, 0 insertions, 0 deletions
