stage2_clear_pte() has a few BUG_ON too many. It should be perfectly legal to unmap pages from the host, even when they do not have a 2nd stage translation in place. Reported-by: Andreas Sandberg <andreas.sandberg@xxxxxxx> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx> --- arch/arm/kvm/mmu.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index dd4bbb0..b463144 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -383,10 +383,12 @@ static void stage2_clear_pte(struct kvm *kvm, phys_addr_t addr) pgd = kvm->arch.pgd + pgd_index(addr); pud = pud_offset(pgd, addr); - BUG_ON(pud_none(*pud)); + if (pud_none(*pud)) + return; pmd = pmd_offset(pud, addr); - BUG_ON(pmd_none(*pmd)); + if (pmd_none(*pmd)) + return; pte = pte_offset_kernel(pmd, addr); set_pte_ext(pte, __pte(0), 0); -- 1.7.8.6 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm