[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 <olekstysh@xxxxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Thu, 7 Oct 2021 23:32:40 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6l8artcHo1hOL5v26iTr6RvV93yEMXXxdFgbI0hHPjk=; b=MN4HCVXz7YRhNbObFKe0sB/L58yxaRb9I5U7YH1e3nav+mB8u0wVBIjUcmmVwHF5JnQVbj0+uJ+IqyijJrdPE4/qRjWta8dikDpBi6RFKocZb2AN9fmxxsHaXU8a8qy7KEAQDI2p2BCfgB+m9jXTOSaHQ3nblp1Y5cWN7NTU6A3KdY9JG3mrSxk1Hmryys4HLu5RgmP1IMS5hMifUqdaP6m8+K8cKdVSbnRX6o2AXwNqM+HIQv+aUxnxpvAUhNnh/eYto8kT56wEc7FPZbIo0l6XfKmtyi4nEAoCpA1bpQYd7KTAFkcQ3u4np0MfR1Ihk0Xw96OavjY7rm9lXxfp0w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EaQ1+CBKtHusJvTn1dWFHPeS9kaIy30Vy/v6j/lCexmIyfo5XIoamocpqU3X6ZE6xfMpny3k0TDiwx+OIBfVopjD/rAL+QzxwGOwON77LI7cdXYKtUohmSsNkqJMuIhD4VD1bP7K2FEhcS8FUvSMfVZZqYgM2lYc7VByWWR0f04N7wwNlGQSama3FH0N7kLsns6luBNV/bhK+amn8PigMX3l4qoSA/XXNN7xgcnS2OVIn/vfSEpQq1rlXwE6TEW5h4MGKjgFFnCStiZ0i/pCjrZ01Y0MJ9IiDvXSTtd2J3ozRpLcQvDbXG2PUTHOJnviwdVczLSXQmsX/Cb4npRuBA==
  • Authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, "tee-dev@xxxxxxxxxxxxxxxx" <tee-dev@xxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 07 Oct 2021 23:32:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXs6cvn7zQUNndCEOzhQWRkGM4Xqu44f8AgA17pgCAAEHdAIABQq8AgABb1YA=
  • Thread-topic: [PATCH] xen/arm: optee: Fix arm_smccc_smc's a0 for OPTEE_SMC_DISABLE_SHM_CACHE

Hi Oleksandr, Stefano,

Oleksandr <olekstysh@xxxxxxxxx> writes:

> On 07.10.21 01:42, Stefano Stabellini wrote:
> Hi Stefano, Julien.
>> On Wed, 6 Oct 2021, Julien Grall wrote:
>>> Hi Stefano,
>>> On 28/09/2021 06:52, Stefano Stabellini wrote:
>>>> On Mon, 27 Sep 2021, Oleksandr Tyshchenko wrote:
>>>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>>>>> Fix a possible copy-paste error in arm_smccc_smc's first argument (a0)
>>>>> 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>
>>>> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>>> I added Fixes: and Backport: tags to the commit
>>> Per SUPPORT.MD, OP-TEE is still a technical preview. So I would argue that 
>>> we
>>> should not do any backport because the feature itself is not officially
>>> considered supported.
>> Good point!
>>> That said, what's missing to make the feature officially supported?
>> If Oleksandr is also happy to make OP-TEE support in Xen "Supported" in
>> SUPPORT.md I'd be happy with that too. Specifically I suggest to change
>> it to:
>> Status: Supported, not security supported
>> Security Support is a bit of a heavy process and I am thinking that
>> "Supported, not security supported" would be an excellent next step.
> I would be happy, and can send a formal patch. But I am not an expert
> in this code.

I'm will be happy with this too. We are using this mediator in our
projects and I know that OP-TEE community adopted tests for
virtualization in theirs CI stack. So this is kind of official now.

Also, I helped other people to bring up virtualization on theirs
platforms, so there are other users for this feature besides EPAM and

> (looks like there are some TODO left in the code and I have no idea
> what are the implications)

Well, there were a lot of TODOs when I submitted initial
implementation. At that time it indeed wasn't ready for production. But
I eventually fixed almost all of them. Only one left now. It is about
very unlikely situation when one of guest pages in mapped at PA=0. I'm
not sure that is even possible at all.

Volodymyr Babchuk at EPAM



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