diff options
author | Quentin Perret <qperret@google.com> | 2021-03-19 10:01:17 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-03-19 12:01:20 +0000 |
commit | fa21472a316af8ad7af3114049db89678444c7ed (patch) | |
tree | 3c88e28e42dae04c2cae8e051d335232343443f2 /arch/arm64/include/asm/hyp_image.h | |
parent | 40a50853d37af3fd2e98b769e1a79839ad16b107 (diff) | |
download | linux-stable-fa21472a316af8ad7af3114049db89678444c7ed.tar.gz linux-stable-fa21472a316af8ad7af3114049db89678444c7ed.tar.bz2 linux-stable-fa21472a316af8ad7af3114049db89678444c7ed.zip |
KVM: arm64: Allow using kvm_nvhe_sym() in hyp code
In order to allow the usage of code shared by the host and the hyp in
static inline library functions, allow the usage of kvm_nvhe_sym() at
EL2 by defaulting to the raw symbol name.
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-10-qperret@google.com
Diffstat (limited to 'arch/arm64/include/asm/hyp_image.h')
-rw-r--r-- | arch/arm64/include/asm/hyp_image.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/hyp_image.h b/arch/arm64/include/asm/hyp_image.h index 78cd77990c9c..b4b3076a76fb 100644 --- a/arch/arm64/include/asm/hyp_image.h +++ b/arch/arm64/include/asm/hyp_image.h @@ -10,11 +10,15 @@ #define __HYP_CONCAT(a, b) a ## b #define HYP_CONCAT(a, b) __HYP_CONCAT(a, b) +#ifndef __KVM_NVHE_HYPERVISOR__ /* * KVM nVHE code has its own symbol namespace prefixed with __kvm_nvhe_, * to separate it from the kernel proper. */ #define kvm_nvhe_sym(sym) __kvm_nvhe_##sym +#else +#define kvm_nvhe_sym(sym) sym +#endif #ifdef LINKER_SCRIPT |