xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls
PATCH 1/1 xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls
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.
--- xen/arch/arm/tee/ffa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/arm/tee/ffa.c +2 -1
@@ -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; } }
Signature · 1 line
2.34.1
Hi,
Quoted 3 lines · Jens Wiklander
Until now has an unsupported FF-A request been reported back with
NIT: I think 'has' is in the wrong place
Quoted 6 lines
ARM_SMCCC_ERR_UNKNOWN_FUNCTIONin register x0. A FF-A caller would rather expectFFA_ERRORin x0 andFFA_RET_NOT_SUPPORTEDin x2 so updateffa_handle_call()to return true and with thecpu_user_regsupdated.Fixes 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator")Signed-off-by Jens Wiklander <[email protected]>
Looking at Linux and TFA, this is indeed expected behavior, so:
~Michal
Quoted 7 lines · Michal Orzel
Hi,
Quoted 3 lines · Jens Wiklander
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,
Signature · 1 line
Julien Grall
Hi Jens,
Quoted 9 lines · Jens Wiklander
Until now has an unsupported FF-A request been reported back with
ARM_SMCCC_ERR_UNKNOWN_FUNCTIONin register x0. A FF-A caller would rather expectFFA_ERRORin x0 andFFA_RET_NOT_SUPPORTEDin x2 so updateffa_handle_call()to return true and with thecpu_user_regsupdated.Fixes 38846de2176b ("xen/arm: tee: add a primitive FF-A mediator")Signed-off-by Jens Wiklander <[email protected]>
With the Nit from Michal fixed in the commit message (could be done on commit):
Cheers
Bertrand
Quoted 21 lines
---
xen/arch/arm/tee/ffa.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)xen/arch/arm/tee/ffa.c +2
-1@@ -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; } }Signature · 1 line
2.34.1