ANDROID: KVM: arm64: iommu: Add domains lock
In preparation to completely decouple domains from IOMMU, we can't
use the IOMMU lock to protect domain operations.
A new lock is added iommu_domains_lock which protects domain
operations.
For now map/unmap are overlocked, this improved next.
We take the domains lock in the attach/detach as they might change the
domain struct, while now leave the IOMMU lock to be up to the driver
to use it, and the IOMMU layet only takes it now for power tracking.
The IOMMU lock is still needed in the SMMU driver to protect against
access from other paths as TLB invalidation and power notifications.
Bug: 277989609
Bug: 278749606
Change-Id: I2bb39dde2b7216a2caacbea5f8ba9c04e9c0c0e6
Signed-off-by:
Mostafa Saleh <smostafa@google.com>
Loading
Please sign in to comment