blob: 2d6b675d386148f7e7e214997ad3a271667866ca [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From 2cdf0de8f42c4825f52618b9bbd2ec2084749de0 Mon Sep 17 00:00:00 2001
2From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
3Date: Thu, 19 May 2022 16:44:13 +0100
4Subject: [PATCH 40/40] ANDROID: KVM: arm64: disable FFA driver at EL2
5
6Do not handle FFA calls
7
8Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
9Upstream-Status: Pending [Not submitted to upstream yet]
10Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
11---
12 arch/arm64/kvm/hyp/nvhe/hyp-main.c | 3 +++
13 arch/arm64/kvm/hyp/nvhe/setup.c | 4 +++-
14 2 files changed, 6 insertions(+), 1 deletion(-)
15
16diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
17index 49345929af0d..463cf27712c3 100644
18--- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c
19+++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
20@@ -1134,8 +1134,11 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
21 bool handled;
22
23 handled = kvm_host_psci_handler(host_ctxt);
24+ /* do not handle ffa calls as EL2 FFA driver is not yet complete */
25+#if 0
26 if (!handled)
27 handled = kvm_host_ffa_handler(host_ctxt);
28+#endif
29 if (!handled)
30 default_host_smc_handler(host_ctxt);
31
32diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
33index 1a6f3eba5035..ce84030426d0 100644
34--- a/arch/arm64/kvm/hyp/nvhe/setup.c
35+++ b/arch/arm64/kvm/hyp/nvhe/setup.c
36@@ -317,10 +317,12 @@ void __noreturn __pkvm_init_finalise(void)
37 if (ret)
38 goto out;
39
40+ /* skip ffa init at EL2, use EL1 driver instead */
41+#if 0
42 ret = hyp_ffa_init(ffa_proxy_pages);
43 if (ret)
44 goto out;
45-
46+#endif
47 hyp_shadow_table_init(shadow_table_base);
48 out:
49 /*
50--
512.34.1
52