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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 09:15:03 +0000 (11:15 +0200)
commit4aa1444f2ecbe70415d23c6282389b62d4b6f59d
treed2204d35b9caa1311a0730a5c7e2bd3cd29a02da
parent6dc878f7eb7b59517518fd6d2b6a80978eda5aa1
ARM: KVM: introduce kvm_p*d_addr_end

commit a3c8bd31af260a17d626514f636849ee1cd1f63e upstream.

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>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/include/asm/kvm_mmu.h
arch/arm/kvm/mmu.c
arch/arm64/include/asm/kvm_mmu.h