From patchwork Tue Sep 24 15:46:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 11159187 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C896014DB for ; Tue, 24 Sep 2019 15:48:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3D15214AF for ; Tue, 24 Sep 2019 15:48:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=epam.com header.i=@epam.com header.b="OJiUCUo+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3D15214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=epam.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCn1b-0001f6-0H; Tue, 24 Sep 2019 15:46:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCn1Z-0001f0-BW for xen-devel@lists.xenproject.org; Tue, 24 Sep 2019 15:46:45 +0000 X-Inumbo-ID: 823c0134-dee2-11e9-bf31-bc764e2007e4 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (unknown [2a01:111:f400:fe0c::612]) by localhost (Halon) with ESMTPS id 823c0134-dee2-11e9-bf31-bc764e2007e4; Tue, 24 Sep 2019 15:46:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zv86U92nMfYSbC48G0QtMifXb4+VhqxtcQk46kMmkwjok29HGaq+u/M9ClHMFnO7UXM9GYo//H2Quf4zr4epS8WTlhClHTc31rTm5zZpH7XtLaRBiy2SjJq1svyAm08zLesjJQQYegxVfYB1uuIpYBnpRkDO4tBeH4c1uUQ/w/9eaB3YynZP9J48ihe5mkEe0O1k9RgrRxCm7idhQ4fr7VGXSsfD2DmCJjNYK6Qe+iGGSm0AAVT3CcE867mpcaWYZWDJf70glFK6WzVc+YI5opz42uP7CNeui8UA1FjLz9270Cub57wgI60CihFoG83UcALFhk+c8P3mmtweDPOI7Q== 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-SenderADCheck; bh=8+j0c3WfffUmA4jOTemDuBF/zJS7AGl4uEvnO1trQcc=; b=gjOaHV1kc3ybmF8L3fSXVwQgo1SCFi6375uZy2BD+TkriZH63j6YbqGKLJV5s6Hw4vIywXdBNpoj6vlDHPdru24juL6umSI+8pe4Mt6w6rQ+EnratNfeOytIars77g9aiezVn/+JkUehkSpVJFrfOHvRTFNqFSTDnBLq3j9bqB6o15p+BYx2pqqjdr61vGMCu47Xpke3fLRbZituWRgw/vaedx4IChoiaAJIW1JgCSEZRq2UsRJpo7FiTbS71AaM6UXm6mOT3QDsgyySYK2AxLe3gKiNv47ug57RERL1L5eqZPHoQKr9qhdQ3bAylXciUg0XgxcqwIAePnmqyJ2CUg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8+j0c3WfffUmA4jOTemDuBF/zJS7AGl4uEvnO1trQcc=; b=OJiUCUo+eHsdt8ID9W51yfyewYcNtghRLSYgZm0PIjHBbZl4ka0jNnLdE5MoxYzoS6HnbKjyir0CVP4C9+VJuMDg1+9YUb0LYFAyduzQpAiI84Hnb8QTVWBIzmDOw7oxbETJZvg5suTQaN6SBsMR5npY1VvQUia/YB93u5Jyvpw= Received: from AM6PR03MB4150.eurprd03.prod.outlook.com (20.177.36.81) by AM6PR03MB4982.eurprd03.prod.outlook.com (20.178.90.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.23; Tue, 24 Sep 2019 15:46:42 +0000 Received: from AM6PR03MB4150.eurprd03.prod.outlook.com ([fe80::3523:ad12:6e5d:5f17]) by AM6PR03MB4150.eurprd03.prod.outlook.com ([fe80::3523:ad12:6e5d:5f17%7]) with mapi id 15.20.2284.023; Tue, 24 Sep 2019 15:46:42 +0000 From: Volodymyr Babchuk To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v3 0/3] arch/arm: optee: fix TODOs and change status to "Tech Preview" Thread-Index: AQHVcu9DeZmnY3z9Z02/+hcfLyj3Ng== Date: Tue, 24 Sep 2019 15:46:42 +0000 Message-ID: <20190924154633.852828-1-volodymyr_babchuk@epam.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; x-originating-ip: [85.223.209.22] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2164a13c-b7cd-4769-b936-08d7410665c7 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM6PR03MB4982; x-ms-traffictypediagnostic: AM6PR03MB4982:|AM6PR03MB4982: x-ms-exchange-transport-forked: True x-ms-exchange-purlcount: 3 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0170DAF08C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(346002)(136003)(396003)(39860400002)(189003)(199004)(2616005)(5660300002)(476003)(36756003)(5640700003)(6486002)(6306002)(6436002)(4326008)(86362001)(54906003)(8676002)(305945005)(6512007)(8936002)(7416002)(316002)(1076003)(7736002)(71200400001)(71190400001)(81166006)(81156014)(2501003)(66476007)(91956017)(6916009)(14454004)(64756008)(486006)(6506007)(66446008)(66556008)(66946007)(966005)(66066001)(478600001)(25786009)(2351001)(76116006)(80792005)(3846002)(2906002)(6116002)(14444005)(256004)(55236004)(26005)(102836004)(186003)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR03MB4982; H:AM6PR03MB4150.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: epam.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 0I98MnD6tZdj7W+ylbTKwg2or9RPi5WhbT/e1KN6QSkKWIlTMDXUBuIwsCrZeSymSEdpJ8IYuZYiO+FMNqk1QAPUtFUn1X4GfSchyujGun8tquBjtRRcYrQKDHWJVW2DZlLxXu3ugD3xDRzPuv9H8ZifPF5Jj3kHrLyydpjpEUzdMte9mByM3Om2UZ7d91PrgzpxY4dXN/5Jjdb3yyzoNg0tCDSR+Ohf1BFpZZZ5czjsK3bHsxFLKkvGUleyn6jt4mbTfhdDZkXqmvrnYowt8Nd3F3kjw+r3GW76G/hNffwXmsfJ1sxSEPSHSsJtNoqioxjQyCz+7AS99hTIxIa/zIQxGyt+3wBbhXGPBXy+x30xe759G/2mWBfrTBVlu9XPiezTrzl7Oh3EEDEcZaKE2rPUToDIxbgOyr1b8/xJS3g= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2164a13c-b7cd-4769-b936-08d7410665c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2019 15:46:42.8533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ad6HcFDOhrYj7iEY8mOi8RMRzOBC7L6E7qeJTarhLOs1Edw7Lam8OJHwic20Y8Vl7PZxZDUeGwmD38MiBvbgmsgDck2Z50sKtFXmlHwJ5jg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB4982 Subject: [Xen-devel] [PATCH v3 0/3] arch/arm: optee: fix TODOs and change status to "Tech Preview" X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , "tee-dev@lists.linaro.org" , Julien Grall , Volodymyr Babchuk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is the third version of maturing the OP-TEE mediator patches. Changes also can be pulled from [3]. Changes from v2: - The following 3 patches were commited: xen/arm: optee: impose limit on shared buffer size xen/arm: optee: check for preemption while freeing shared buffers xen/arm: optee: limit number of shared buffers - Other changes are described in the corresponding patches Changes from v1: - Added patch that updates SUPPORT.md - Instead of removing "experimental" status I changed it to "Tech Preview" - Other changes are described in the corresponding patches Cover letter for v1: This patch series fixes various unfinished items in the OP-TEE mediator. Mostly this is about limiting resources that guest can consume. This includes both memory and time - how many buffers guest can share with OP-TEE (this uses Xen memory) and when mediator should preempt itself, to make sure that guest does not stress scheduling. Apart from this, there were one case, when mediator's actions might lead to memory leak in a good-behaving guest. To fix this issue I had to extend mediator logic, so now it can issue RPC requests to guest in the same way, as OP-TEE does this. This is useful feature, because it allows to preempt mediator during long operations. So, in the future it will be possible to remove shared buffer size limitation, because mediator can preempt self during buffer translation. This patch series can be pulled from [1]. [1] https://github.com/lorc/xen/tree/optee3_v1 [2] https://github.com/lorc/xen/tree/optee3_v2 [3] https://github.com/lorc/xen/tree/optee3_v3 Volodymyr Babchuk (3): xen/arm: optee: handle shared buffer translation error SUPPORT.md: Describe OP-TEE mediator xen/arm: optee: update description in Kconfig SUPPORT.md | 4 + xen/arch/arm/tee/Kconfig | 9 +- xen/arch/arm/tee/optee.c | 173 ++++++++++++++++++++++++++++++++------- 3 files changed, 151 insertions(+), 35 deletions(-)