ARM: KVM: introduce kvm_p*d_addr_end
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 18 Feb 2014 14:29:03 +0000 (14:29 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:34 +0000 (17:18 +0200)
commit086ffbacac938e5d6208d286ffdf01867753a071
tree222c30e94f2376ba0f21ec744736ff6242879f74
parent8d8d8cd59448d8f2f9cba73d6cd5558ebe7d5a43
ARM: KVM: introduce kvm_p*d_addr_end

The use of p*d_addr_end with stage-2 translation is slightly dodgy,
as the IPA is 40bits, while all the p*d_addr_end helpers are
taking an unsigned long (arm64 is fine with that as unligned long
is 64bit).

The fix is to introduce 64bit clean versions of the same helpers,
and use them in the stage-2 page table code.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit a3c8bd31af260a17d626514f636849ee1cd1f63e)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/kvm_mmu.h
arch/arm/kvm/mmu.c
arch/arm64/include/asm/kvm_mmu.h