[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: ffa: fix guest map RX/TX error code
- To: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Mon, 4 Sep 2023 15:17:00 +0000
- Accept-language: en-GB, en-US
- 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=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=moJc+Plf2lnc+nhGDyE/NC3UhTpdM5oHUFDrKjzeQGM=; b=OxCkULfF93+8tv94MHKumwt7YlEwtmf/dLmHwsBHapmSVJwCu2UkVzqGwjw8ciuFsRnOQTgF6fEnwEDYgAHI7AXv+4kumqo2PQrHubSqdBhY1CvtPmHuz241ZIenZJTrm37NcwYnHRiz+qw3nUcSnLNCe5vuErpnFC+FPCUXQ7RE9GYK1LFgdR+5Ahsk0OHm/bdw957FhrU22UXb2E6qGGpiHE+mNVf18b6SEsCgZ4GVag8hVLBBVq9lmoCtqPgeN+zlpQmcex61mw2rRnt7xRMKBMOaxXlGyBHgNEUg061USavmXN41HRjeSjdgyJG2qU54Lu77xmIxQwlFbfGpUA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AVecoezH//7eBLyAV59mGjFkskN/EZJEySGgszIdXwSWsCRG4Yek4pMeKvmlHLVxOo36eN9HFNDxWfBlIxBNfzpY43ghQH1nQLcYkpC8F0XI1zSNImHWcc4zL3O/KKbLda0efil6YDv4cJpN/h1t5I3tfhKkqah+Z3ekPHtFXeDB96qkE8cV3IOiG8uq6gVbjHqsgcIVRmwtvC8NryUM/XSFmv6s+QItrDvmcKsxtUnINhus+Gg+179DqD5wLV0AWMM3Z2LAPksRUfFPANpyE9Taq8iqhdiekNZlYY3XFkT6L6HHKo57roeLw9jd+sXLA0FOJBc9ATs7Qxi+mBCSOQ==
- 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>, Marc Bonnici <Marc.Bonnici@xxxxxxx>, Achin Gupta <Achin.Gupta@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
- Delivery-date: Mon, 04 Sep 2023 15:17:20 +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: AQHZ30BfHINFg5m3OEWmBuJ6JsrWObAKxyWA
- Thread-topic: [PATCH] xen/arm: ffa: fix guest map RX/TX error code
Hi Jens,
> On 4 Sep 2023, at 16:58, Jens Wiklander <jens.wiklander@xxxxxxxxxx> wrote:
>
> FFA_RXTX_MAP is currently limited to mapping only one 4k page for each
> RX and TX buffer. If a guest tries to map more than one page, an error
> is returned. Until this patch, we have been using FFA_RET_NOT_SUPPORTED.
> However, that error code is reserved in the FF-A specification to report
> that the function is not implemented. Of all the other defined error
> codes, the least bad is FFA_RET_INVALID_PARAMETERS, so use that instead.
Agree and thanks for the fix.
>
> Fixes: 38d81e7ccb11 ("xen/arm: ffa: support mapping guest RX/TX buffers")
> Signed-off-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
> ---
> xen/arch/arm/tee/ffa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
> index 802b2dbb1d36..183528d13388 100644
> --- a/xen/arch/arm/tee/ffa.c
> +++ b/xen/arch/arm/tee/ffa.c
> @@ -706,7 +706,7 @@ static uint32_t handle_rxtx_map(uint32_t fid, register_t
> tx_addr,
> {
> printk(XENLOG_ERR "ffa: RXTX_MAP: error: %u pages requested (limit
> %u)\n",
> page_count, FFA_MAX_RXTX_PAGE_COUNT);
> - return FFA_RET_NOT_SUPPORTED;
> + return FFA_RET_INVALID_PARAMETERS;
> }
>
> /* Already mapped */
> --
> 2.34.1
>
|