FROMLIST: firmware/smccc: Call arch-specific hook on discovering KVM services
arm64 will soon require its own callback to initialise services that are only availably on this architecture. Introduce a hook that can be overloaded by the architecture. Link: https://lore.kernel.org/r/20211004174849.2831548-12-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Will Deacon <will@kernel.org> Bug: 209580772 Change-Id: I743e1786df1477b3c9fab0fe2e5ea52a7dcdf01f Signed-off-by: Will Deacon <willdeacon@google.com>
This commit is contained in:
parent
f4c9f74c6b
commit
8e3a834c92
|
@ -6,5 +6,6 @@
|
|||
|
||||
void kvm_init_hyp_services(void);
|
||||
bool kvm_arm_hyp_service_available(u32 func_id);
|
||||
void kvm_arm_init_hyp_services(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
|
||||
void kvm_init_hyp_services(void);
|
||||
bool kvm_arm_hyp_service_available(u32 func_id);
|
||||
void kvm_arm_init_hyp_services(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include <asm/hypervisor.h>
|
||||
|
||||
void __weak kvm_arm_init_hyp_services(void) {}
|
||||
|
||||
static DECLARE_BITMAP(__kvm_arm_hyp_services, ARM_SMCCC_KVM_NUM_FUNCS) __ro_after_init = { };
|
||||
|
||||
void __init kvm_init_hyp_services(void)
|
||||
|
@ -38,6 +40,8 @@ void __init kvm_init_hyp_services(void)
|
|||
|
||||
pr_info("hypervisor services detected (0x%08lx 0x%08lx 0x%08lx 0x%08lx)\n",
|
||||
res.a3, res.a2, res.a1, res.a0);
|
||||
|
||||
kvm_arm_init_hyp_services();
|
||||
}
|
||||
|
||||
bool kvm_arm_hyp_service_available(u32 func_id)
|
||||
|
|
Loading…
Reference in New Issue