KVM: arm64: Fix constant-pool users in hyp
authorDavid Brazdil <dbrazdil@google.com>
Tue, 5 Jan 2021 18:05:39 +0000 (18:05 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 23 Jan 2021 14:01:00 +0000 (14:01 +0000)
commit97cbd2fc0257c6af7036a9a6415ca8ad43535d6b
tree4e5de94f6e4764f57296e259bf22eb1543381257
parent6ec6259d7084ed32e164c9f7b69049464dd90fa5
KVM: arm64: Fix constant-pool users in hyp

Hyp code uses absolute addressing to obtain a kimg VA of a small number
of kernel symbols. Since the kernel now converts constant pool addresses
to hyp VAs, this trick does not work anymore.

Change the helpers to convert from hyp VA back to kimg VA or PA, as
needed and rework the callers accordingly.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210105180541.65031-7-dbrazdil@google.com
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/hyp/nvhe/host.S
arch/arm64/kvm/hyp/nvhe/hyp-init.S