[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: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Mon, 27 Sep 2021 23:12:59 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=holjH+HfB8CXCHfIgJ8fG7J1vTR3WfyEe4KZjexySjc=; b=hYu9nUurlw/HXaeDL/RyrYAgXNL36aFabdcYanwCiIFB6oCzNH8T2cThPsTIFlqxAgHnjs3Mkmpc1RFe9XKx4fne9pHJhjH1bCC9T+DFl9XOYKfEjydukRzKL6QkVhlUr89bNP8DFGwjEdkIL5eeMDGvnIcvmpmGba+WnkD22a/HCH8CyKmC9q3e9ExJKALp13WfwM68HAVVWj+C2o8i2JmtD4O5W78bnSD32J0Jc04vItxetTC9yzKtKflKEbUgB5i5HzxTJhcfPDyoT3yGgvP+8n73E5988T7729YEaC8497rdYID2OSkc/Oq0hv5Fy2HR8uIg0mI9zFlpS9Bdrg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=azWj0i0FTrFaL+NXMxE23idqUY66tExIdoyF0LVJRnukU2K7w78wYlfJ+iUGD0md7/eGs92Ik8Tn9iRtdcZOMwDJrde69BolSCAbB/ndodfcAf+6UGSgDvil3rkWGVgTY1Q98BAyORWfktvWQP4CATZwZpFKbRbF4EbZc1OTOZIS46StQBjhZ2DtGKwJ3gF4fCM1CrdGzuRaPCP6ycE86ozNE7LuGRgCDtibskHPKCBfiUc8eEFypSiYWyfq0U1nemmGs3+V5bdjA4c3XSFWjhERy3MvMjAPAeHXKxWyW/KcCFdL7Lf2MVCrkgLCrbqK9HM6phSLGbTijx8Lzf7DqA==
  • Authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "tee-dev@xxxxxxxxxxxxxxxx" <tee-dev@xxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 27 Sep 2021 23:13:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXs6cvn7zQUNndCEOzhQWRkGM4Xqu4gvCA
  • Thread-topic: [PATCH] xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE

Hi Oleksandr,

Oleksandr Tyshchenko <olekstysh@xxxxxxxxx> writes:

> 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>

Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>

> ---
> 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 ) {


-- 
Volodymyr Babchuk at EPAM


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.