[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH] xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls
- To: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Wed, 13 Dec 2023 14:12:24 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zXvCi0VToAqo8eGsgipSbL9qnm6d03x9sVDBPq3nMlw=; b=L7unJMdlMo5Ar48ff2O7FuCxOx3QOGO3uAOqY1cyD8hSYzu7nsMkHqdTudExed5Y0RHPNJE4FFZiFrqvsKJ9zR0CYpvReUqiZwZClPjNlzWhyibq33TK4h37Vj7RbVUrbyGNq2kQ3Uv83WOZCULoH9JraPZD3fepbL6CLTl2BwSh3hVWs8JEJUr0bOw//M72lvWHY8eMZQLBuqgL5F1Yy2wqdEIc9qcU5Qwii36LWeX3cxMKXfQflzi1KHO9tvAJh59IFi4HcYa73S4TOvZYhWhmvNlqICWwxg8CYqJp4wFJU4VBtJCQRzdAqE8XpQYvBGjK5HoWSfo22/UAoEHdjA==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zXvCi0VToAqo8eGsgipSbL9qnm6d03x9sVDBPq3nMlw=; b=ODr0t6biUUU4aa4czfT3ggRUM9zw4ecouBK6n5yQnOkbR6vhNPeZ6VfLt71I9Jiltw90ux9uWxzX9CfHJv+i3nr9VpaaCfZIPFNyQGDf0dvcrDBCKo+GX9+c3L2kLjIDtNqsZPcxfW3JG5ZcGu+prQXGSMGHlZiRH6YOqBLuLe0hImIK5joDXf+PKgGV0AHBoRviq7Baa08iRzvpjeuv6rW6rrL3rkD63Z6DmbevYsQu8ElzUpFAM6ba5QyRE2fdIL5+QHVibgB1Te5RO27Ip7Z3MK28FCw1h6jWyCv1MfaDq5n5iIQGHPWL0l945b++GeNghNYe1zrmeYW2iA1QPQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AlPgVnqXfE8udOL50Bd8KeDpieXbrQ2nqxqaRSRuI8V+yjawEjeyflByjiXxzs7WSGBT3Qva/FVeZ/REunU5Y4TcUsaFOCFbRC1trV4jojoqYoelwY2keWWXwgqncw1FZaLw+ziAvApgnDh1LE53FsK9QMC0/h1A+ciFxYnBNq2myXyaizx64NYqOFPhUBMhhd+E9Daq4/f84Lt/5ggWA8ldtMzagdigl0RfPgcE+8wm7OkG/pIuZgUNHpF3q8Iyzs/wnNQKpJ9pXatZCu8kquQufhZz+IhR2JikH/ulrHYElcqK+WWMgNC802+CoM44DSopqwZqsxKv/KnpuPKkEA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ayg+l5atxpPAZYOsqjoM16rNhXTznyOBOFGPULX4C/vDAQH/4jsxEx4D7bE7bKRZ5V28ZjSAgNy4ug9ABxP1SOlr6GQ6np0wB3548kX8aPdradAJJwGKU1WkLnboxindopvjmenh/xjpX7VQ5JXo6rDVFuxY2J+k9XTrjMNA16Vx5KR5VzdxHEg7xwA7z9JsOtP/c1ytcWfgFi50FZSrpMTjd2d8JAZJRNqhVuaUhKAX0SRfQGp0fFEhXcfM3GII1IFNNb+vg4kWrQbb/dLYcTpkpYtUI39HeJqE0H4sdWO+QngXlQQ1CZ1t1BiALrZWc0G2Enb8hGc13cOu2vLCqA==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "patches@xxxxxxxxxx" <patches@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
- Delivery-date: Wed, 13 Dec 2023 14:13:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHaLa+9f2NgKntfU0yyvul3VTpCb7CnQV2A
- Thread-topic: [XEN PATCH] xen/arm: ffa: return FFA_RET_NOT_SUPPORTED on unhandled calls
Hi Jens,
> On 13 Dec 2023, at 11:32, Jens Wiklander <jens.wiklander@xxxxxxxxxx> 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@xxxxxxxxxx>
With the Nit from Michal fixed in the commit message (could be done on commit):
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
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
>
|