diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-11-19 20:59:12 +0100 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2013-12-11 18:49:31 +0100 |
commit | 4fda342cc7f577599c53fd27b99c953c7b1da18a (patch) | |
tree | c28226f8b534634775f22b821a2d8cbb5996761e /arch/arm64 | |
parent | Merge tag 'kvm-s390-20131128' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-4fda342cc7f577599c53fd27b99c953c7b1da18a.tar.xz linux-4fda342cc7f577599c53fd27b99c953c7b1da18a.zip |
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/kvm_mmu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index 680f74e67497..7f1f9408ff66 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h @@ -136,6 +136,7 @@ static inline void coherent_icache_guest_page(struct kvm *kvm, hva_t hva, } #define kvm_flush_dcache_to_poc(a,l) __flush_dcache_area((a), (l)) +#define kvm_virt_to_phys(x) __virt_to_phys((unsigned long)(x)) #endif /* __ASSEMBLY__ */ #endif /* __ARM64_KVM_MMU_H__ */ |