[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE
- To: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Mon, 27 Sep 2021 14:36:51 +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; bh=AA0A5XgcHo/DiPOEgEiB18CiJ3SV9SeYjxxmhRrAfbc=; b=UgRbUf1AyR+f976UhNqYVPFdyWw+nwlS2Po5AQpc0QRgaLdnWW6nk0BdDfa+ZuAaAHqVe6dVk4Oj1TUMEZ9OAGZmcwOjnphRcetozx1m+3UWy74zfJBIe+qcoYHOE5x+gafuwv4OGJhFjzFOdTbExG1e/mFdNKuz4kf4tB06MbthVhkLB9HChFatHJIHIhuASSSan6tfyUvPc8Wog2PJ2speGJ8lcGLPVEdPMG1JIh/BG93+aWmg7Jxaoi7slJxjMJ/DrVMBcLc/PyudogP0War9wPqTgoZHfVp9EZ5KEFy9vgJwDkN+y7ZbT3cIAC63uc5mluTPwv6tUDmA7SMCMQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OpgJRqO0P+bcake9HXvn67nVT7/z0B/pwhBxkcM8qRZZisrH++SHEFEIK9+w0zhRP3Y6mwVy7qRW2/6f6uow/0fzm4be6gCdeMJ9+Br62JMgToSCxs1o6ztUyBPpjmVfXsHm3U87hTPw+ZvMawVEAfFHRqR26f2EVkOgztIM68tiC+ZKd5ZJiiiW12TTkAcbrB7C2ElFZ8rBzMT6KlM9vhDK2N/lG7OmNHv+MwRwzRgYA8F036RC/I0wi2nVC0tKcZ2HEwSglC6xdjY1NUxFFNKOAH5B2bCrya+8CgiSvgxJo/ug2geddu0e0k9j1AfDARqCojR0fedQAkzY7NGefg==
- Authentication-results-original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "tee-dev@xxxxxxxxxxxxxxxx" <tee-dev@xxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 27 Sep 2021 14:37:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
- Thread-index: AQHXs6dCIyk0ePXwCku0OJ1w+54IXKu38umA
- Thread-topic: [PATCH] xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE
Hi Oleksandr,
> On 27 Sep 2021, at 14:54, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx> wrote:
>
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>
> Fix a possible copy-paste error in arm_smccc_smc's first argument (a0)
> for OPTEE_SMC_DISABLE_SHM_CACHE case.
>
> This error causes Linux > v5.14-rc5 (b5c10dd04b7418793517e3286cde5c04759a86de
> optee: Clear stale cache entries during initialization) to stuck
> repeatedly issuing OPTEE_SMC_DISABLE_SHM_CACHE call and waiting for
> the result to be OPTEE_SMC_RETURN_ENOTAVAIL which will never happen.
>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
Sound like a reasonable change :-)
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
> ---
> I wonder whether this patch wants backporting to the old versions
> since OPTEE support went in.
> ---
> xen/arch/arm/tee/optee.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c
> index 3453615..6df0d44 100644
> --- a/xen/arch/arm/tee/optee.c
> +++ b/xen/arch/arm/tee/optee.c
> @@ -1692,7 +1692,7 @@ static bool optee_handle_call(struct cpu_user_regs
> *regs)
> return true;
>
> case OPTEE_SMC_DISABLE_SHM_CACHE:
> - arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
> + arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
> OPTEE_CLIENT_ID(current->domain), &resp);
> set_user_reg(regs, 0, resp.a0);
> if ( resp.a0 == OPTEE_SMC_RETURN_OK ) {
> --
> 2.7.4
>
>
|