diff options
author | David Brazdil <dbrazdil@google.com> | 2020-12-08 17:24:50 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-22 13:49:01 +0300 |
commit | 61fe0c37af57ac35472a870581a7d0bb5ac2f63a (patch) | |
tree | 79d6e9092e4830d0eb756c857f657262b9b5f035 /arch/arm64/kvm/va_layout.c | |
parent | c3e181aec96f6ada84df1cb72a72be8970f8b284 (diff) | |
download | linux-61fe0c37af57ac35472a870581a7d0bb5ac2f63a.tar.xz |
KVM: arm64: Minor cleanup of hyp variables used in host
Small cleanup moving declarations of hyp-exported variables to
kvm_host.h and using macros to avoid having to refer to them with
kvm_nvhe_sym() in host.
No functional change intended.
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201208142452.87237-5-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kvm/va_layout.c')
-rw-r--r-- | arch/arm64/kvm/va_layout.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm64/kvm/va_layout.c b/arch/arm64/kvm/va_layout.c index 914732b88c69..70fcd6a12fe1 100644 --- a/arch/arm64/kvm/va_layout.c +++ b/arch/arm64/kvm/va_layout.c @@ -34,17 +34,16 @@ static u64 __early_kern_hyp_va(u64 addr) } /* - * Store a hyp VA <-> PA offset into a hyp-owned variable. + * Store a hyp VA <-> PA offset into a EL2-owned variable. */ static void init_hyp_physvirt_offset(void) { - extern s64 kvm_nvhe_sym(hyp_physvirt_offset); u64 kern_va, hyp_va; /* Compute the offset from the hyp VA and PA of a random symbol. */ kern_va = (u64)lm_alias(__hyp_text_start); hyp_va = __early_kern_hyp_va(kern_va); - CHOOSE_NVHE_SYM(hyp_physvirt_offset) = (s64)__pa(kern_va) - (s64)hyp_va; + hyp_physvirt_offset = (s64)__pa(kern_va) - (s64)hyp_va; } /* |