diff options
author | David Brazdil <dbrazdil@google.com> | 2020-09-22 23:49:02 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-09-30 10:33:52 +0300 |
commit | ce492a16ffb8814d9651c3fdafc363bfa1b01189 (patch) | |
tree | 51eb7e5c29f681dfbf76459495902f52a6d95f15 /arch/arm64/include/asm/hyp_image.h | |
parent | ab25464bdabd45f283cc1194e332040f89071106 (diff) | |
download | linux-ce492a16ffb8814d9651c3fdafc363bfa1b01189.tar.xz |
kvm: arm64: Move nVHE hyp namespace macros to hyp_image.h
Minor cleanup to move all macros related to prefixing nVHE hyp section
and symbol names into one place: hyp_image.h.
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200922204910.7265-3-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/include/asm/hyp_image.h')
-rw-r--r-- | arch/arm64/include/asm/hyp_image.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/hyp_image.h b/arch/arm64/include/asm/hyp_image.h index 2e38fcda02fc..daa1a1da539e 100644 --- a/arch/arm64/include/asm/hyp_image.h +++ b/arch/arm64/include/asm/hyp_image.h @@ -7,6 +7,12 @@ #ifndef __ARM64_HYP_IMAGE_H__ #define __ARM64_HYP_IMAGE_H__ +/* + * 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 + #ifdef LINKER_SCRIPT /* @@ -19,6 +25,12 @@ #define HYP_SECTION(NAME) \ HYP_SECTION_NAME(NAME) : { *(NAME NAME##.*) } +/* + * Defines a linker script alias of a kernel-proper symbol referenced by + * KVM nVHE hyp code. + */ +#define KVM_NVHE_ALIAS(sym) kvm_nvhe_sym(sym) = sym; + #endif /* LINKER_SCRIPT */ #endif /* __ARM64_HYP_IMAGE_H__ */ |