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 <lkp@intel.com>
Change-Id: Icdac2ccd32d09388472c6500d4af951cc23439fb
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
Vincent Donnefort
2022-12-22 16:18:53 +00:00
parent 49d7088c5f
commit 803b66f506

View File

@@ -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[]; \