Commit 0ba5b4ba authored by Marc Zyngier's avatar Marc Zyngier Committed by Will Deacon
Browse files

firmware/smccc: Call arch-specific hook on discovering KVM services



arm64 will soon require its own callback to initialise services
that are only available on this architecture. Introduce a hook
that can be overloaded by the architecture.

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240830130150.8568-2-will@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 7c626ce4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,4 +7,6 @@
void kvm_init_hyp_services(void);
bool kvm_arm_hyp_service_available(u32 func_id);

static inline void kvm_arch_init_hyp_services(void) { };

#endif
+4 −0
Original line number Diff line number Diff line
@@ -7,4 +7,8 @@
void kvm_init_hyp_services(void);
bool kvm_arm_hyp_service_available(u32 func_id);

static inline void kvm_arch_init_hyp_services(void)
{
};

#endif
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,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_arch_init_hyp_services();
}

bool kvm_arm_hyp_service_available(u32 func_id)