Received: by 10.223.164.221 with SMTP id h29csp2682169wrb; Tue, 3 Oct 2017 09:06:06 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCMvXtL0GgmheFV6npYhiLoRvEMh4gK9nfDob0gs70mPusdK1lCJZ6ymfo8w7w9qziu722j X-Received: by 10.98.144.89 with SMTP id a86mr17523040pfe.64.1507046765916; Tue, 03 Oct 2017 09:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507046765; cv=none; d=google.com; s=arc-20160816; b=SKPijUvL0XH6rZiQkE8IIiWQGJSRp6oUynBXxe070SSCqGKeYcSLVAEJQrgH7yEQDp PeGvpNmNIfBg8q/vLIkZcBi7r2xJ5Szz34KTd0LgXYQoi5668FwTEF5CB0WkNe/VFC0h UZqhI43F3QvZzsQj5V89BSE8VTCoxM37GmXcEgzZ1iBTpwDPvQ75s0CkxD3yUDubVC8g AG7QxGSXbo9uQ8qtScf7cNo9g5dEeR84JXCLHYqQHrM9Kjo3EP+p8kL0EGtWyqZVs09P LnkOa+Cw2XLCyBhZJ6cSLavB2Qu8F9P/kzeHMFQujaqJU5VB0X3QfhWDWxaBwB8r0rUQ OePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=Qd3Ogg88ipNTSLCNulqk6jtdt1GcfrHZJGCWVf5fLWU=; b=QTpOObaeCIuyYV3HMiTZu+pVQ33owp1YzzOFL4wuEg3eXA4nxNBUp+Xrm2SyT61jAr rJhzNzDckrrPTdOme4iwEO0gMWWOJgg59oF+syJB8g1p5NHvTmWkwLoTxgexdQYBk6TJ 1pymzip+uE8BbR7p3bW8FjDh3C2ds3A9N/U7N5j6RO7B6KMizqxxnjfJ85lHYpP88aCB iAlskg4fG9WlcOMx+Ra90FAOt7T96Bi9lO3Ai8LcZ0ziczbfF7e6YeB/xoMOM8XNTEsW 2+ivPTiV6Gn8ppIGDZGd7hdWK2/mPhJqqJCRY/9JgbPlUP4DQVagN0JNowZYkLqZIPrZ VY4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g76si10023645pfe.81.2017.10.03.09.05.51; Tue, 03 Oct 2017 09:06:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751811AbdJCQFb (ORCPT + 99 others); Tue, 3 Oct 2017 12:05:31 -0400 Received: from foss.arm.com ([217.140.101.70]:51022 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbdJCQFa (ORCPT ); Tue, 3 Oct 2017 12:05:30 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C23A1596; Tue, 3 Oct 2017 09:05:30 -0700 (PDT) Received: from c02sv19cfvh4.usa.arm.com (c02sv19cfvh4.usa.arm.com [10.118.100.79]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DB20E3F578; Tue, 3 Oct 2017 09:05:29 -0700 (PDT) Subject: Re: [Tee-dev] [PATCH v1 00/14] tee: optee: add dynamic shared memory support To: Volodymyr Babchuk , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander References: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> From: Stuart Yoder Message-ID: Date: Tue, 3 Oct 2017 11:05:29 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1506621851-6929-1-git-send-email-volodymyr_babchuk@epam.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/28/17 1:03 PM, Volodymyr Babchuk wrote: > From: Volodymyr Babchuk > > This patch series enables dynamic shared memory support in the TEE > subsystem as a whole and in OP-TEE in particular. > > Global Platform TEE specification [1] allows client applications > to register part of own memory as a shared buffer between > application and TEE. This allows fast zero-copy communication between > TEE and REE. But current implementation of TEE in Linux does not support > this feature. > > Also, current implementation of OP-TEE transport uses fixed size > pre-shared buffer for all communications with OP-TEE OS. This is okay > in the most use cases. But this prevents use of OP-TEE in virtualized > environments, because: > a) We can't share the same buffer between different virtual machines > b) Physically contiguous memory as seen by VM can be non-contiguous > in reality (and as seen by OP-TEE OS) due to second stage of > MMU translation. > c) Size of this pre-shared buffer is limited. > > So, first part of this patch series adds generic register/unregister > interface to tee subsystem. Next patches add necessary features > into OP-TEE driver, so it can use not only static pre-shared buffer, > but whole RAM to communicate with OP-TEE OS. As is, the patch series enables dynamic shared memory, but keeps the assumption that there must static shared memory as well. In the case of virtual machines this isn't what we want (at least that's the way I see KVM working). The series substantially re-works optee_config_shm_memremap() and it seems like it would not be that difficult to remove the assumptions that there _must_ be static shared memory available. ...I have some more specific comments on patch 12/14. Thanks, Stuart From 1579870916511794946@xxx Fri Sep 29 10:51:56 +0000 2017 X-GM-THRID: 1579807611018198018 X-Gmail-Labels: Inbox,Category Forums