ANDROID: KVM: arm64: Don't update IOMMU under memory pressure
host_stage2_unmap_unmoveable_regs() is called when the hypervisor pool is under pressure to map stage-2 enteries, so it unmap all enteries that can't be donated and owned by the host so it can be lazily faulted later. But that doesn't change any ownership of pages, so they are still owned by the host and must remain mapped in the IOMMU. Bug: 428939924 Change-Id: Id91183619a316a67bda48d8e9adf9b6ef49c104f Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
@@ -491,17 +491,9 @@ int __pkvm_prot_finalize(void)
|
||||
|
||||
int host_stage2_unmap_reg_locked(phys_addr_t start, u64 size)
|
||||
{
|
||||
int ret;
|
||||
|
||||
hyp_assert_lock_held(&host_mmu.lock);
|
||||
|
||||
ret = kvm_pgtable_stage2_reclaim_leaves(&host_mmu.pgt, start, size);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
kvm_iommu_host_stage2_idmap(start, start + size, 0);
|
||||
|
||||
return 0;
|
||||
return kvm_pgtable_stage2_reclaim_leaves(&host_mmu.pgt, start, size);
|
||||
}
|
||||
|
||||
static int host_stage2_unmap_unmoveable_regs(void)
|
||||
|
Reference in New Issue
Block a user