diff options
author | David Brazdil <dbrazdil@google.com> | 2020-12-02 21:41:09 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-04 13:08:34 +0300 |
commit | 687413d34d4aa72103de3e545f431f480dd21d7f (patch) | |
tree | 5c5c5f2bc574130b660bcfde236eb85bf1aa5184 /arch/arm64/kernel/image-vars.h | |
parent | 2d7bf218ca739554bf7277ab0dbfa5399d01f7c6 (diff) | |
download | linux-687413d34d4aa72103de3e545f431f480dd21d7f.tar.xz |
KVM: arm64: Support per_cpu_ptr in nVHE hyp code
When compiling with __KVM_NVHE_HYPERVISOR__, redefine per_cpu_offset()
to __hyp_per_cpu_offset() which looks up the base of the nVHE per-CPU
region of the given cpu and computes its offset from the
.hyp.data..percpu section.
This enables use of per_cpu_ptr() helpers in nVHE hyp code. Until now
only this_cpu_ptr() was supported by setting TPIDR_EL2.
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201202184122.26046-14-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kernel/image-vars.h')
-rw-r--r-- | arch/arm64/kernel/image-vars.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h index 08e69faedf6c..39289d75118d 100644 --- a/arch/arm64/kernel/image-vars.h +++ b/arch/arm64/kernel/image-vars.h @@ -99,6 +99,9 @@ KVM_NVHE_ALIAS(gic_nonsecure_priorities); KVM_NVHE_ALIAS(__start___kvm_ex_table); KVM_NVHE_ALIAS(__stop___kvm_ex_table); +/* Array containing bases of nVHE per-CPU memory regions. */ +KVM_NVHE_ALIAS(kvm_arm_hyp_percpu_base); + #endif /* CONFIG_KVM */ #endif /* __ARM64_KERNEL_IMAGE_VARS_H */ |