]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Add kimg_hyp_va() helper
authorMarc Zyngier <maz@kernel.org>
Wed, 21 Oct 2020 19:48:02 +0000 (20:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 9 Nov 2020 16:56:39 +0000 (16:56 +0000)
commitf58a44e25de1e574a01513cee477ffa1e2b871ab
tree0b875630a1e300480e9532be817812633b5205b3
parent1a1a5d6cd1062ccc15f5dedff6e1f10224f45f11
KVM: arm64: Add kimg_hyp_va() helper

KVM/arm64 is so far unable to deal with function pointers, as the compiler
will generate the kernel's runtime VA, and not the linear mapping address,
meaning that kern_hyp_va() will give the wrong result.

We so far have been able to use PC-relative addressing, but that's not
always easy to use, and prevents the implementation of things like
the mapping of an index to a pointer.

To allow this, provide a new helper that computes the required
translation from the kernel image to the HYP VA space.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/va_layout.c