ANDROID: iommu/arm-smmu-v3-kvm: Fix idmap free_leaf
As at the moment we don't support page table coalescing, it is possible to call free_leaf while mapping a THP for a guest. This should do nothing as the identity mapped page table doesn't do any tracking of pages in the vmemmap. Bug: 421734292 Change-Id: I436b9839643f8a4a76035bd2fa1e273d64456690 Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
@@ -928,6 +928,12 @@ static void smmu_tlb_add_page(struct iommu_iotlb_gather *gather,
|
||||
|
||||
static void smmu_free_leaf(unsigned long phys, size_t granule, void *cookie)
|
||||
{
|
||||
struct kvm_hyp_iommu_domain *domain = cookie;
|
||||
|
||||
/* No tracking for idmap domain. */
|
||||
if (domain->domain_id == KVM_IOMMU_DOMAIN_IDMAP_ID)
|
||||
return;
|
||||
|
||||
WARN_ON(iommu_pkvm_unuse_dma(phys, granule));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user