]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls
authorJens Wiklander <jens.wiklander@linaro.org>
Wed, 13 Dec 2023 10:32:41 +0000 (11:32 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 13 Dec 2023 16:23:55 +0000 (16:23 +0000)
Until now an unsupported FF-A request has 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>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
xen/arch/arm/tee/ffa.c

index 183528d133880aca1c17311cd1576f7fad24c65c..98905fec79676b3d1d0404abc2ccdcebbe3a7bff 100644 (file)
@@ -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;
     }
 }