Until now has an unsupported FF-A request been reported back with
ARM_SMCCC_ERR_UNKNOWN_FUNCTION in register x0. A FF-A caller would
rather expect FFA_ERROR in x0 and FFA_RET_NOT_SUPPORTED in x2 so update
ffa_handle_call() to return true and with the cpu_user_regs updated.
Fixes: 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator")
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
xen/arch/arm/tee/ffa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
index 183528d13388..98905fec7967 100644
--- a/xen/arch/arm/tee/ffa.c
+++ b/xen/arch/arm/tee/ffa.c
@@ -1477,7 +1477,8 @@ static bool ffa_handle_call(struct cpu_user_regs *regs)
default:
gprintk(XENLOG_ERR, "ffa: unhandled fid 0x%x\n", fid);
- return false;
+ set_regs_error(regs, FFA_RET_NOT_SUPPORTED);
+ return true;
}
}
--
2.34.1
Hi Jens, > On 13 Dec 2023, at 11:32, Jens Wiklander <jens.wiklander@linaro.org> wrote: > > Until now has an unsupported FF-A request been reported back with > ARM_SMCCC_ERR_UNKNOWN_FUNCTION in register x0. A FF-A caller would > rather expect FFA_ERROR in x0 and FFA_RET_NOT_SUPPORTED in x2 so update > ffa_handle_call() to return true and with the cpu_user_regs updated. > > Fixes: 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator") > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> With the Nit from Michal fixed in the commit message (could be done on commit): Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> Cheers Bertrand > --- > xen/arch/arm/tee/ffa.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c > index 183528d13388..98905fec7967 100644 > --- a/xen/arch/arm/tee/ffa.c > +++ b/xen/arch/arm/tee/ffa.c > @@ -1477,7 +1477,8 @@ static bool ffa_handle_call(struct cpu_user_regs *regs) > > default: > gprintk(XENLOG_ERR, "ffa: unhandled fid 0x%x\n", fid); > - return false; > + set_regs_error(regs, FFA_RET_NOT_SUPPORTED); > + return true; > } > } > > -- > 2.34.1 >
Hi, On 13/12/2023 11:32, Jens Wiklander wrote: > > > Until now has an unsupported FF-A request been reported back with NIT: I think 'has' is in the wrong place > ARM_SMCCC_ERR_UNKNOWN_FUNCTION in register x0. A FF-A caller would > rather expect FFA_ERROR in x0 and FFA_RET_NOT_SUPPORTED in x2 so update > ffa_handle_call() to return true and with the cpu_user_regs updated. > > Fixes: 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator") > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Looking at Linux and TFA, this is indeed expected behavior, so: Reviewed-by: Michal Orzel <michal.orzel@amd.com> ~Michal
On 13/12/2023 13:06, Michal Orzel wrote: > Hi, > > On 13/12/2023 11:32, Jens Wiklander wrote: >> >> >> Until now has an unsupported FF-A request been reported back with > NIT: I think 'has' is in the wrong place Indeed. I have updated the commit message and committed. Cheers, -- Julien Grall
© 2016 - 2024 Red Hat, Inc.