]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
firmware/smccc: Call arch-specific hook on discovering KVM services
authorMarc Zyngier <maz@kernel.org>
Fri, 30 Aug 2024 13:01:44 +0000 (14:01 +0100)
committerWill Deacon <will@kernel.org>
Fri, 30 Aug 2024 15:30:41 +0000 (16:30 +0100)
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: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240830130150.8568-2-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm/include/asm/hypervisor.h
arch/arm64/include/asm/hypervisor.h
drivers/firmware/smccc/kvm_guest.c

index bd61502b97153cfb83b12ccb9e2d5c42e8df6572..8a648e506540fe7c8046aa3af9341aca52d7bf38 100644 (file)
@@ -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
index 0ae427f352c8cab9440ae723735c396794cbe208..8cab2ab535b7e01a36a95ceaf47cbb495f62c154 100644 (file)
@@ -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
index 89a68e7eeaa6f5431652beef49a081d7bb2f0aa3..f3319be20b36592513b08544b2b1de35a49e79f8 100644 (file)
@@ -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)