summaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm/mmio.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2013-08-06 13:05:48 +0100
committerChristoffer Dall <christoffer.dall@linaro.org>2013-08-07 18:17:39 -0700
commit979acd5e18c3e5cb7e3308c699d79553af5af8c6 (patch)
treecda729a9d652b3d19cb88efa78e846af4032cf67 /arch/arm/kvm/mmio.c
parentd3840b26614d8ce3db53c98061d9fcb1b9ccb0dd (diff)
downloadlinux-979acd5e18c3e5cb7e3308c699d79553af5af8c6.tar.bz2
arm64: KVM: fix 2-level page tables unmapping
When using 64kB pages, we only have two levels of page tables, meaning that PGD, PUD and PMD are fused. In this case, trying to refcount PUDs and PMDs independently is a a complete disaster, as they are the same. We manage to get it right for the allocation (stage2_set_pte uses {pmd,pud}_none), but the unmapping path clears both pud and pmd refcounts, which fails spectacularly with 2-level page tables. The fix is to avoid calling clear_pud_entry when both the pmd and pud pages are empty. For this, and instead of introducing another pud_empty function, consolidate both pte_empty and pmd_empty into page_empty (the code is actually identical) and use that to also test the validity of the pud. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/kvm/mmio.c')
0 files changed, 0 insertions, 0 deletions