ANDROID: KVM: arm64: iommu: Restore domain atomic refcount
Currently, kvm_hyp_iommu_domain has a lock per domain, this is used
to protect both the domain structure and the page table pointed
by the domain.
In the next patches, we are going to split that, where the IOMMU code
only some guarantees about domain state and the rest along with page table
protection will be done inside the module as it is hardware specific.
The IOMMU code only guarantees the following:
- No race between free_domain and map/unmap.
- No race between free_domain and attach/detach.
- No map/unmap/attach/detach on not fully allocated domain.
It’s the module responsibility to protect against concurrent
map/unmap/attach/detach…
At the moment both the lock and atomic refcount exist, but the lock
will be removed next from the common code.
Bug: 277989609
Bug: 278749606
Change-Id: Idd86566f66c6d6243176cb993f3259fdbbafdc0b
Signed-off-by:
Mostafa Saleh <smostafa@google.com>
Loading
Please sign in to comment