From 916bf93d52d2b4c62cd91604ee5c1b254f16cc74 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Wed, 3 Feb 2021 14:19:31 +0000 Subject: [PATCH] FROMGIT: KVM: arm64: Stub EXPORT_SYMBOL for nVHE EL2 code In order to ensure the module loader does not get confused if a symbol is exported in EL2 nVHE code (as will be the case when we will compile e.g. lib/memset.S into the EL2 object), make sure to stub all exports using __DISABLE_EXPORTS in the nvhe folder. Suggested-by: Ard Biesheuvel Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210203141931.615898-3-qperret@google.com (cherry picked from commit bbc075e01ceac50e0a8353b520544f3089e94e44 git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next) Signed-off-by: Will Deacon Change-Id: I99090963a702ffd4a68b99f2c2b6afebbec05426 Bug: 178098380 Test: atest VirtualizationHostTestCases on an EL2-enabled device --- arch/arm64/kvm/hyp/nvhe/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index ed10fcf1b345..a6707df4f6c0 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -3,8 +3,8 @@ # Makefile for Kernel-based Virtual Machine module, HYP/nVHE part # -asflags-y := -D__KVM_NVHE_HYPERVISOR__ -ccflags-y := -D__KVM_NVHE_HYPERVISOR__ +asflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS +ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS hostprogs := gen-hyprel HOST_EXTRACFLAGS += -I$(objtree)/include