From 803b66f506969637cc2fb9f0c680fe0146700022 Mon Sep 17 00:00:00 2001 From: Vincent Donnefort Date: Thu, 22 Dec 2022 16:18:53 +0000 Subject: [PATCH] ANDROID: KVM: arm64: Always declare pKVM module loading functions Move __pkvm_register_el2_call and __pkvm_load_el2_module out of the MODULE ifdef so the associated EXPORT_SYMBOL are never alone. Bug: 244543039 Bug: 244373730 Reported-by: kernel test robot Change-Id: Icdac2ccd32d09388472c6500d4af951cc23439fb Signed-off-by: Vincent Donnefort --- arch/arm64/include/asm/kvm_pkvm_module.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/kvm_pkvm_module.h b/arch/arm64/include/asm/kvm_pkvm_module.h index c19441709edb..c76bd3276f06 100644 --- a/arch/arm64/include/asm/kvm_pkvm_module.h +++ b/arch/arm64/include/asm/kvm_pkvm_module.h @@ -49,10 +49,12 @@ struct pkvm_el2_module { int (*init)(const struct pkvm_module_ops *ops); }; -#ifdef MODULE int __pkvm_load_el2_module(struct pkvm_el2_module *mod, struct module *this, unsigned long *token); +int __pkvm_register_el2_call(dyn_hcall_t hfn, unsigned long token, + unsigned long hyp_text_kern_va); +#ifdef MODULE #define pkvm_load_el2_module(init_fn, token) \ ({ \ extern char __kvm_nvhe___hypmod_text_start[]; \ @@ -83,9 +85,6 @@ int __pkvm_load_el2_module(struct pkvm_el2_module *mod, struct module *this, __pkvm_load_el2_module(&mod, THIS_MODULE, token); \ }) -int __pkvm_register_el2_call(dyn_hcall_t hfn, unsigned long token, - unsigned long hyp_text_kern_va); - #define pkvm_register_el2_mod_call(hfn, token) \ ({ \ extern char __kvm_nvhe___hypmod_text_start[]; \