FROMLIST: 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>
Link: https://lore.kernel.org/r/20210315143536.214621-10-qperret@google.com
Bug: 178098380
Change-Id: If82eb4fadb95772646d2215028dbb70a05a6a671
This commit is contained in:
Quentin Perret
2021-03-15 14:35:09 +00:00
parent 81181250ba
commit a3aad4cf4a

View File

@@ -10,11 +10,15 @@
#define __HYP_CONCAT(a, b) a ## b #define __HYP_CONCAT(a, b) a ## b
#define HYP_CONCAT(a, b) __HYP_CONCAT(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_, * KVM nVHE code has its own symbol namespace prefixed with __kvm_nvhe_,
* to separate it from the kernel proper. * to separate it from the kernel proper.
*/ */
#define kvm_nvhe_sym(sym) __kvm_nvhe_##sym #define kvm_nvhe_sym(sym) __kvm_nvhe_##sym
#else
#define kvm_nvhe_sym(sym) sym
#endif
#ifdef LINKER_SCRIPT #ifdef LINKER_SCRIPT