@@ -1109,7 +1109,8 @@ static int stage2_set_pmd_huge(struct kvm *kvm, struct kvm_mmu_memory_cache
* get handled accordingly.
*/
if (!pmd_thp_or_huge(old_pmd)) {
- unmap_stage2_range(kvm, addr & S2_PMD_MASK, S2_PMD_SIZE, 0);
+ unmap_stage2_range(kvm, addr & S2_PMD_MASK, S2_PMD_SIZE,
+ KVM_UNMAP_ELIDE_CMO);
goto retry;
}
/*
@@ -1159,7 +1160,8 @@ static int stage2_set_pud_huge(struct kvm *kvm, struct kvm_mmu_memory_cache *cac
* the range for this block and retry.
*/
if (!stage2_pud_huge(kvm, old_pud)) {
- unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE, 0);
+ unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE,
+ KVM_UNMAP_ELIDE_CMO);
goto retry;
}
In the rare cases where we're converting a table mapping in a block mapping, there is no point in cleaning memory to the PoC, as we're about to remap the exact same pages again, only as a block mapping. Signed-off-by: Marc Zyngier <maz@kernel.org> --- virt/kvm/arm/mmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)