Skip to content

Commit 3471ee0

Browse files
David BrazdilMarc Zyngier
authored andcommitted
kvm: arm64: Only define __kvm_ex_table for CONFIG_KVM
Minor cleanup that only creates __kvm_ex_table ELF section and related symbols if CONFIG_KVM is enabled. Also useful as more hyp-specific sections will be added. 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-4-dbrazdil@google.com
1 parent ce492a1 commit 3471ee0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/arm64/kernel/vmlinux.lds.S‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ ENTRY(_text)
2222
jiffies = jiffies_64;
2323

2424

25+
#ifdef CONFIG_KVM
2526
#define HYPERVISOR_EXTABLE \
2627
. = ALIGN(SZ_8); \
2728
__start___kvm_ex_table = .; \
2829
*(__kvm_ex_table) \
2930
__stop___kvm_ex_table = .;
31+
#else /* CONFIG_KVM */
32+
#define HYPERVISOR_EXTABLE
33+
#endif
3034

3135
#define HYPERVISOR_TEXT \
3236
/* \

0 commit comments

Comments
 (0)