From patchwork Wed Sep 18 18:50:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 11151145 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 0C789112B for ; Wed, 18 Sep 2019 18:52:18 +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 DB6A721928 for ; Wed, 18 Sep 2019 18:52:17 +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="FSkI45Oe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB6A721928 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 1iAf2S-0006A1-8D; Wed, 18 Sep 2019 18:50:52 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iAf2R-00069w-Db for xen-devel@lists.xenproject.org; Wed, 18 Sep 2019 18:50:51 +0000 X-Inumbo-ID: 3b532d0c-da45-11e9-a337-bc764e2007e4 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (unknown [40.107.8.53]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3b532d0c-da45-11e9-a337-bc764e2007e4; Wed, 18 Sep 2019 18:50:50 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAtyTEIVaax5cIRG/jOlISmCzulHeQjB4SGjU6Xd1diji9y2Q4FkWvB49rdL5NJPTtyupjO0arRERBdcSyjZljBolf+3MpPgKa9fV9m17D4rq3YaelfQ+2ZszuCrfNQTZCNvdUjBkSyf5u9D7BUCdShj+J1pQsty/1BwNUnMUM3xkHZijM9W37SCD34dwKPYjev3rHJeTS4K3lcVBu9lfZMzSaqMWihcDWgCYPeSwn8XbWjz41G0nt8bRc1Gw5SHCW4jl45dnX/aQHbyZWiIuHkYVz7dGmH+Cx9ZPia2yK60iUQhmgwf8WWH0Evr0B2ZRM/8QzIppT1KE9LEJDkmgA== 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=0Ili6GR/gqyWQWG2AoYUt7R83ZmHOeSQjsJ8GDuCqVY=; b=ao294wguwSrP3JRgN/SmCAmSQv0/6f5/QyRdMxj7d2GO5tFy7QuC44YmmRS4KCI7H0vGxLKTku3ipvPgU55Q4zSH5h7CVPrwyVnvSVqu7/9nFDzXz+qtccqVgyOpIgA3VD01WcNXR49IoRSAJvX7iHw50yfBa+6jHum3D7EvYzc+s7e9ffaAzTDXD2guVRgoAgkPisQinovg1Z1NpXrK2agi23aXBVKkw2f6ITC7sL2MJ9OuIXe23SLsGCTi/Zz34OPstWg4QQR+Z2Pt7/0/rsRQ7wCUegKZKp0w/CRKEYJUFDoCUpgo8UUGuBYloVo3zPxz4cPGRNwkxpy9HsrSHA== 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=0Ili6GR/gqyWQWG2AoYUt7R83ZmHOeSQjsJ8GDuCqVY=; b=FSkI45OeToFBL3titnjEWbBoJ1XUrZPl78nWdFHUoqJU5DfEGrn02ozBD+tKR30dDoastIE8xdmqckMyj98/4Ce237ciLt+clKNMSXMmyZWEhCpMwhx3OaVH5DFJTtUUe7lOtmhVHT2NQRi5YuMCzNDg5qA9nB0TwHOOZoO4TLg= Received: from AM0PR03MB4148.eurprd03.prod.outlook.com (20.177.40.10) by AM0PR03MB5761.eurprd03.prod.outlook.com (20.179.252.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.15; Wed, 18 Sep 2019 18:50:48 +0000 Received: from AM0PR03MB4148.eurprd03.prod.outlook.com ([fe80::71e3:834d:5708:5a0a]) by AM0PR03MB4148.eurprd03.prod.outlook.com ([fe80::71e3:834d:5708:5a0a%5]) with mapi id 15.20.2199.015; Wed, 18 Sep 2019 18:50:48 +0000 From: Volodymyr Babchuk To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v2 0/6] arch/arm: optee: fix TODOs and change status to "Tech Preview" Thread-Index: AQHVblH8i61pl6vNQkm74GnHH+XmdA== Date: Wed, 18 Sep 2019 18:50:48 +0000 Message-ID: <20190918185041.22738-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: 7b7ae7ec-4e87-4357-7e2b-08d73c691ef5 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:AM0PR03MB5761; x-ms-traffictypediagnostic: AM0PR03MB5761:|AM0PR03MB5761: x-ms-exchange-transport-forked: True x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01644DCF4A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(376002)(39860400002)(346002)(396003)(189003)(199004)(66476007)(6116002)(478600001)(14454004)(66446008)(80792005)(2616005)(55236004)(8936002)(966005)(6306002)(66066001)(5660300002)(2501003)(81156014)(305945005)(7736002)(81166006)(66556008)(8676002)(256004)(71200400001)(14444005)(71190400001)(99286004)(54906003)(1076003)(86362001)(26005)(6512007)(5640700003)(2906002)(186003)(102836004)(3846002)(64756008)(76116006)(2351001)(91956017)(6506007)(25786009)(486006)(7416002)(66946007)(36756003)(476003)(4326008)(316002)(6436002)(6486002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR03MB5761; H:AM0PR03MB4148.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: 2kA26dy8I6cDEyevFLlN70l0l6NdU/TmK+QekVxznfeQjfAB0gIwnGGWF5AAWwXZWmROm0fCPabQMvdvg41/tg8dwawp96Y+zfwiI3UidmvYazTpwBpT8Znk2UwkG+EmkQX05nquX+csVzOKgRcHB1XXy2/pmhlHgTMsoehIeKq++AfV0drXMP2aLaRKBraZPkmXDNgMlt/Gsp0RErYWXmHtOYGWDkD0VteP6uzmeJKHlyQpDRXIoUPY4TtS4xwoTgg76zQGcugig5uLAKin8MUteGOfsLtZYvm1YHEIO1uitypBMH+DM4YguR7g0182/3G/Ualo6Et8T42fZLa5gLBRt7ZmcQoNauQIXTQ+VvqNdX5fB5fxv3rUUajWp8proAlt8Ab+sThywEtgAEeVgcV6mQzujSGMYR3wZYr/wEc= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b7ae7ec-4e87-4357-7e2b-08d73c691ef5 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2019 18:50:48.3533 (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: /Cp7ACO/aYcLnHrE2FI7qAwHQb2KP96vfFaGSmf8gYVkze4WlxKMQv79GUibuSvnxVgsiEmQ0t4w42e0z2EWUoBE6lwaFbKBhCmKmF3+p88= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR03MB5761 Subject: [Xen-devel] [PATCH v2 0/6] 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 , Jan Beulich , Volodymyr Babchuk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hello, This is the second version for maturing the OP-TEE mediator. Changes also can be pulled from [2]. 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 Volodymyr Babchuk (6): 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 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 | 12 +- xen/arch/arm/tee/optee.c | 259 ++++++++++++++++++++++++++++++--------- 3 files changed, 213 insertions(+), 62 deletions(-)