arm/arm64: kvm: Use virt_to_idmap instead of virt_to_phys for idmap mappings
commit4fda342cc7f577599c53fd27b99c953c7b1da18a
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Tue, 19 Nov 2013 19:59:12 +0000 (19 14:59 -0500)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 11 Dec 2013 17:49:31 +0000 (11 09:49 -0800)
treec28226f8b534634775f22b821a2d8cbb5996761e
parentd6d63b51fe3bfea0cf596993afa480b0b3b02c32
arm/arm64: kvm: Use virt_to_idmap instead of virt_to_phys for idmap mappings

KVM initialisation fails on architectures implementing virt_to_idmap()
because virt_to_phys() on such architectures won't fetch you the correct
idmap page.

So update the KVM ARM code to use the virt_to_idmap() to fix the issue.
Since the KVM code is shared between arm and arm64, we create
kvm_virt_to_phys() and handle the redirection in respective headers.

Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
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