ANDROID: KVM: arm64: iommu: Add owner to domains
Add an owner to each domain either host or a VM which is set at alloc time, and all other IOMMU operations would be allowed only from the domain owner. The new vm member is protected by kvm_iommu_domain_lock while set/cleared in alloc/free, and the check is done only after the domain refcount is elevated to avoid racing with alloc. Bug: 357781595 Bug: 348382247 Bug: 236685427 Change-Id: Ie23379d958922368ec3be2127ba90393709a77bb Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
8a9430e18b
commit
540b4b9ce3
@@ -21,6 +21,7 @@ struct kvm_hyp_iommu_domain {
|
||||
atomic_t refs;
|
||||
pkvm_handle_t domain_id;
|
||||
void *priv;
|
||||
void *vm;
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user