From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC8AC49EA2 for ; Thu, 17 Jun 2021 04:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 834C861001 for ; Thu, 17 Jun 2021 04:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbhFQEfh (ORCPT ); Thu, 17 Jun 2021 00:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhFQEfg (ORCPT ); Thu, 17 Jun 2021 00:35:36 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE1AAC061574 for ; Wed, 16 Jun 2021 21:33:28 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id l15so2705808lje.10 for ; Wed, 16 Jun 2021 21:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XZjUR44YaNoQXcJB+dlktg3mNBZU4O2yhCDUy1ikvnA=; b=VTA9HcmiANLZolcCm6eIiiATqHIyWdcIcc/pObJ3eMq4PmtDTYhHmSCCMSEIG+AAYH JIMtKQg0rUlWhZh0BxBC6WbrtwS7DtZSEY+tivkhFdpNZ7WnoUf5E/L5gjDrxNp4bxIs rhPLQAsPvvaoPdEJ040GMoeD3Spe+426FQIQ11pnUCpa77ib3GALo1RxAqBPhMkm9TvV FEhqPO98wdT40c0ldFgbOmBsFPeLxJCqgR4/DfeW38Or3kmXng6LRI1+nmCqaWHHHPi1 dAdJiGoPoj9MPX3wC+nF+gXynznwQE6cEL3a/m2S/N7rQHT2FW2hGxvlQVL7wkwDnxRc 0Wcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XZjUR44YaNoQXcJB+dlktg3mNBZU4O2yhCDUy1ikvnA=; b=U67jcG+lBhUfv6eqDcZTfz/c/AMvRY/agFA9GyADoOFkFpGhb5A/dNlMG87/RGvMt6 J/rN4+8Olm3sRaUjY5viIt7YmGH8RaCjVDlyMYGEHQW7jLKt1yGiwcNamPZSsiB5lXFr /1V0TSEln3zn29LsiDLHGAEnQJcPTT/WaNO3bmK45FtT6XtXipVsAgUYoIt8w1i9NVzk +S9AP5Jkz35GJyuR4JJASCyRY8wi0bp61Ut2IpIGx/pNJ200VQsAPmf1HEAxVR6lyGz4 KyAUqeC+Itr10d2aooF4DVP/XVkiguXKGyQydDwWxDtk1Gv0Ex85uusnxbWUlljrLDQ2 iTcw== X-Gm-Message-State: AOAM533YEWptv4sHCxcUy/2ZJ+VVN9sadozv5DwAyqZRcwNvdtqREWyJ krLHTRYWDPg/BAuS8dtH00DeKGP69YoKEbbDasUK/w== X-Google-Smtp-Source: ABdhPJxaiyDi1aNHhmmcMlUBaaNXuxoKEaKMW5FSsqO8dU/Wz2t9fQ5Q9biZFQUJ797nIe45j6+PqatZ0FSdX6tHSnU= X-Received: by 2002:a2e:311:: with SMTP id 17mr2780769ljd.442.1623904407105; Wed, 16 Jun 2021 21:33:27 -0700 (PDT) MIME-Version: 1.0 References: <20210616103649.2662395-1-jens.wiklander@linaro.org> In-Reply-To: <20210616103649.2662395-1-jens.wiklander@linaro.org> From: Sumit Garg Date: Thu, 17 Jun 2021 10:03:14 +0530 Message-ID: Subject: Re: [PATCH v2 0/7] Asynchronous notifications from secure world To: Jens Wiklander Cc: Linux Kernel Mailing List , linux-arm-kernel , op-tee@lists.trustedfirmware.org, Devicetree List , Linux Doc Mailing List , Jerome Forissier , Etienne Carriere , Vincent Guittot , Rob Herring , Jonathan Corbet , Ard Biesheuvel , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, On Wed, 16 Jun 2021 at 16:07, Jens Wiklander wrote: > > Hi all, > > This adds support for asynchronous notifications from OP-TEE in secure > world to the OP-TEE driver. This allows a design with a top half and bottom > half type of driver where the top half runs in secure interrupt context and > a notifications tells normal world to schedule a yielding call to do the > bottom half processing. > > An interrupt is used to notify the driver that there are asynchronous > notifications pending. > It looks like a nice feature. I would like to get hands on with this. Can I test this feature on Qemu? -Sumit > v2: > * Added documentation > * Converted optee bindings to json-schema and added interrupt property > * Configure notification interrupt from DT instead of getting it > from secure world, suggested by Ard Biesheuvel . > > Thanks, > Jens > > Jens Wiklander (7): > docs: staging/tee.rst: add a section on OP-TEE notifications > dt-bindings: arm: Convert optee binding to json-schema > dt-bindings: arm: optee: add interrupt property > tee: fix put order in teedev_close_context() > tee: add tee_dev_open_helper() primitive > optee: separate notification functions > optee: add asynchronous notifications > > .../bindings/arm/firmware/linaro,optee-tz.txt | 31 --- > .../arm/firmware/linaro,optee-tz.yaml | 57 +++++ > Documentation/staging/tee.rst | 27 +++ > drivers/tee/optee/Makefile | 1 + > drivers/tee/optee/call.c | 27 +++ > drivers/tee/optee/core.c | 87 +++++-- > drivers/tee/optee/notif.c | 226 ++++++++++++++++++ > drivers/tee/optee/optee_msg.h | 9 + > drivers/tee/optee/optee_private.h | 23 +- > drivers/tee/optee/optee_rpc_cmd.h | 31 +-- > drivers/tee/optee/optee_smc.h | 75 +++++- > drivers/tee/optee/rpc.c | 73 +----- > drivers/tee/tee_core.c | 37 ++- > include/linux/tee_drv.h | 27 +++ > 14 files changed, 576 insertions(+), 155 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt > create mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > create mode 100644 drivers/tee/optee/notif.c > > -- > 2.31.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB59C2B9F4 for ; Thu, 17 Jun 2021 04:35:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1099F613DF for ; Thu, 17 Jun 2021 04:35:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1099F613DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yj/fYx76X2dSd7ArGlw9FtO1OzT6w42XLsQ2u/2xF3k=; b=scHFYB8iv9zUyQ 6wKs2Gu0c15A7//sMOGgel4ik+avvHp7I9JhPPJOitQjANCpyNAE2o2S9Rl5Vgv+FsqwIug7I5zTz N26Dub+2qJ61gKQVq949UYz1yLhkgvcpyDZDOetBJdIcu7W9nfBiBbPFDZfwzvraSZzecfgHZkp0T uQ7heih+/njdHX1O9SeiaERWPPKaBQbheTfM6m92IWclqCwXBnvaM/ev1Z00jqBtnRq6jfhBTmxBY U8bEXkahGvMTgoLFwPjLP1TiIQm0yxkVu1e6fS89v4NwDhRn+g1P+vqfRaIG0e5FKBB7Edv4xjyLA y+a6f1kQTdSPKZFjmJhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltjig-008jUk-M8; Thu, 17 Jun 2021 04:33:34 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltjic-008jTV-5g for linux-arm-kernel@lists.infradead.org; Thu, 17 Jun 2021 04:33:31 +0000 Received: by mail-lj1-x230.google.com with SMTP id s22so6960182ljg.5 for ; Wed, 16 Jun 2021 21:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XZjUR44YaNoQXcJB+dlktg3mNBZU4O2yhCDUy1ikvnA=; b=VTA9HcmiANLZolcCm6eIiiATqHIyWdcIcc/pObJ3eMq4PmtDTYhHmSCCMSEIG+AAYH JIMtKQg0rUlWhZh0BxBC6WbrtwS7DtZSEY+tivkhFdpNZ7WnoUf5E/L5gjDrxNp4bxIs rhPLQAsPvvaoPdEJ040GMoeD3Spe+426FQIQ11pnUCpa77ib3GALo1RxAqBPhMkm9TvV FEhqPO98wdT40c0ldFgbOmBsFPeLxJCqgR4/DfeW38Or3kmXng6LRI1+nmCqaWHHHPi1 dAdJiGoPoj9MPX3wC+nF+gXynznwQE6cEL3a/m2S/N7rQHT2FW2hGxvlQVL7wkwDnxRc 0Wcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XZjUR44YaNoQXcJB+dlktg3mNBZU4O2yhCDUy1ikvnA=; b=jRIwid2e3spZMud+li4Lsac/yVzl2G0D4bjFGs2RL3WfIf8pzg4kqHuvnYYVbwsNfs G3Y42FKw5Vbw61g2meGXh7Q/hWOWqbZpTKzvDuM/EIssfYzTy4DpWizagXjAWUNJUWn9 uhb4rhNct+SfCf4r81BAZM4hAi5jIAjNn4J84zuGZuwJRn17CbnJ5p8hJ6Plg1B/OMYK pfyj5RkmiLUGRJsLdm16VswhzK7RZ2xuSBi5gMGLH5hxs76/1JhmmMN66lpBu/HWcLdv esbfE5Vqqn12nSlK1JkYqjQh8d6ZXHguZPdpo2K0tyOzU/KkUkcCCzG3bzn++tZDlY2W Vx/A== X-Gm-Message-State: AOAM533FBGqRANiTWDrkXYKc8FtuzWb1iMIm2Y83KvEypKpxuZxlK+fL +Ok6VlppnrLQuFvlyglWukdDvJOQZvToX92fjIYTMg== X-Google-Smtp-Source: ABdhPJxaiyDi1aNHhmmcMlUBaaNXuxoKEaKMW5FSsqO8dU/Wz2t9fQ5Q9biZFQUJ797nIe45j6+PqatZ0FSdX6tHSnU= X-Received: by 2002:a2e:311:: with SMTP id 17mr2780769ljd.442.1623904407105; Wed, 16 Jun 2021 21:33:27 -0700 (PDT) MIME-Version: 1.0 References: <20210616103649.2662395-1-jens.wiklander@linaro.org> In-Reply-To: <20210616103649.2662395-1-jens.wiklander@linaro.org> From: Sumit Garg Date: Thu, 17 Jun 2021 10:03:14 +0530 Message-ID: Subject: Re: [PATCH v2 0/7] Asynchronous notifications from secure world To: Jens Wiklander Cc: Linux Kernel Mailing List , linux-arm-kernel , op-tee@lists.trustedfirmware.org, Devicetree List , Linux Doc Mailing List , Jerome Forissier , Etienne Carriere , Vincent Guittot , Rob Herring , Jonathan Corbet , Ard Biesheuvel , Marc Zyngier X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210616_213330_308763_933AB039 X-CRM114-Status: GOOD ( 20.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jens, On Wed, 16 Jun 2021 at 16:07, Jens Wiklander wrote: > > Hi all, > > This adds support for asynchronous notifications from OP-TEE in secure > world to the OP-TEE driver. This allows a design with a top half and bottom > half type of driver where the top half runs in secure interrupt context and > a notifications tells normal world to schedule a yielding call to do the > bottom half processing. > > An interrupt is used to notify the driver that there are asynchronous > notifications pending. > It looks like a nice feature. I would like to get hands on with this. Can I test this feature on Qemu? -Sumit > v2: > * Added documentation > * Converted optee bindings to json-schema and added interrupt property > * Configure notification interrupt from DT instead of getting it > from secure world, suggested by Ard Biesheuvel . > > Thanks, > Jens > > Jens Wiklander (7): > docs: staging/tee.rst: add a section on OP-TEE notifications > dt-bindings: arm: Convert optee binding to json-schema > dt-bindings: arm: optee: add interrupt property > tee: fix put order in teedev_close_context() > tee: add tee_dev_open_helper() primitive > optee: separate notification functions > optee: add asynchronous notifications > > .../bindings/arm/firmware/linaro,optee-tz.txt | 31 --- > .../arm/firmware/linaro,optee-tz.yaml | 57 +++++ > Documentation/staging/tee.rst | 27 +++ > drivers/tee/optee/Makefile | 1 + > drivers/tee/optee/call.c | 27 +++ > drivers/tee/optee/core.c | 87 +++++-- > drivers/tee/optee/notif.c | 226 ++++++++++++++++++ > drivers/tee/optee/optee_msg.h | 9 + > drivers/tee/optee/optee_private.h | 23 +- > drivers/tee/optee/optee_rpc_cmd.h | 31 +-- > drivers/tee/optee/optee_smc.h | 75 +++++- > drivers/tee/optee/rpc.c | 73 +----- > drivers/tee/tee_core.c | 37 ++- > include/linux/tee_drv.h | 27 +++ > 14 files changed, 576 insertions(+), 155 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt > create mode 100644 Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml > create mode 100644 drivers/tee/optee/notif.c > > -- > 2.31.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel