Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5297929pxv; Tue, 6 Jul 2021 23:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIAIybQvbNKXqbI4rGPaJ8m4aQvcKYMMO38R4DxLM4dgC5DXaDNFVvezRTbwLnII9e7ZJs X-Received: by 2002:a05:6402:68a:: with SMTP id f10mr27865310edy.99.1625640975861; Tue, 06 Jul 2021 23:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625640975; cv=none; d=google.com; s=arc-20160816; b=vGF5tUvwW5QyWtFrBy+oiWiiwW5uiQT6DwMNwmSyZ9+SiIkKiSVYnNSC6R5FNtLjlH ktUOVKNQ8m9jZT+sVj5B0hWogdYaXuwcM8TTpFk74rW4zjtkYFNfpgm0wVG9T2kLQVYL qEzpch8Ixq/jN1KPD//AFSIa1MNZRrv98U07K5+qeEf3YZ13OF8xEiwkGiG4SUZWA6LW dei20qst1kCLVcRT7f7Vu25uOJ7RkNUiEehrZi1PX53xhgvd+xExl0bpptDBw4azDm4h 5drSTsSiJ21XzwkxRT+0nNos//fObFZ8npJacB4H4v4JL9dtUPpUV//tnouumPemifPc jnjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tUE8wev4VkWfjOiCPCyu/GqgRwGG7gs7uHBEzTIZe3c=; b=vX706FzUSwRZetrhs69LEXDSImHK8sxj26aPUv6435ycF529SKPya2b090g52rVywI 4pKCopKz+WNeLj5xKNB6JA1uTS78pCL0THMy9ZkbDnUbhCRVwqMdx09/ldFd5DF0XwdI IQOl+vDsZrWeLlCTU2RVEGdP+QA+/f/LbQ7A1RMW9vuaLC3+EYzNBxSfp8p1uxZdqTi5 k0zbSEkqXUkuVPol7hvUqmuY17ZRbQUlS+bjZQ0xplLFpMqB1JXmVqD5dpZoiw54KfWt dnwlY4AdnbFAvh6p2oxKBYt55YDjgtkp/xuxmDie9RimEc+1zOhlqSyp9khQs0uhdKm+ igRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HO5A4MDp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si9812440edq.161.2021.07.06.23.55.53; Tue, 06 Jul 2021 23:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HO5A4MDp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbhGGG5N (ORCPT + 99 others); Wed, 7 Jul 2021 02:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbhGGG5M (ORCPT ); Wed, 7 Jul 2021 02:57:12 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF62C061574 for ; Tue, 6 Jul 2021 23:54:31 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id b14-20020a1c1b0e0000b02901fc3a62af78so3348224wmb.3 for ; Tue, 06 Jul 2021 23:54:31 -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=tUE8wev4VkWfjOiCPCyu/GqgRwGG7gs7uHBEzTIZe3c=; b=HO5A4MDpkx13VC3Yw2cptgr73MkV2G5xH8GcIHQMD2ep1iOn3CS8VoF9o3sz43+71+ +R3aWRgRdYsGc6k3/64PPRrYJD21oDybN4rqEhpKo01JhMlzSsZO7a8AA9DtJ2BXuujx c0clc8S636KiUYaSY0FYeM3+kPfaJyglcf4WULX91rK5G+Ro3gKLyhZetCrXWUeVW75Q 9BgGYbV10cmt9K9NMzE3gPVjlh5YklXD5+L+dtzEhOS+JPnIYcUslFn69z82ZRbmriW1 ljQbYX9t34JqSYy11CaSfLUYiyr0FBIn0f9gUvE74yfUhGspGvfKQP7V9EeJRc8IrIQb 0ZfA== 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=tUE8wev4VkWfjOiCPCyu/GqgRwGG7gs7uHBEzTIZe3c=; b=pm7sf7kPT6uEDgSqC/ILvofyFcH/XPsjxlfMfiHV6DKjLM8jX7AAv8oKMMdQDRCZ4l 13jLvV8JVV80k0ay3KINmbbHEyRQaYsnSvb4wx3omw7zley5DJo8JVwbrxmmGX2j9+fb B67kqLIvAal1UL7jjLoLBgKAs7Ope6fF6jlOLyIBuXVqIUG3ZNxCaD0DtaNtRPyhaM1C E8Dtdgsmfq7YjNDrFNEafCrBu2IMybAh9iUoo5HgHsbF4IQvCjRN1jD4oNEbIcgSGBMj pLLfs97Kfe7zeOo2eSJJYqO8ERMPzV6HSYSoA5N2lWhhbYHL5EWqm8B8OaO19w9/iANp pSzA== X-Gm-Message-State: AOAM5323RPgZ0ZfTkfGVaOjoFmiGAYXgWJR7IjDNwTSsOOqKEL2xRsSW aYd4i8iWZOEvr4+AYyKOyJ2OddG7OMWcb/S4Ackgow== X-Received: by 2002:a7b:ce82:: with SMTP id q2mr4888352wmj.60.1625640870431; Tue, 06 Jul 2021 23:54:30 -0700 (PDT) MIME-Version: 1.0 References: <20210616103649.2662395-1-jens.wiklander@linaro.org> <87czrv91b2.wl-maz@kernel.org> <87a6mz8vaj.wl-maz@kernel.org> In-Reply-To: From: Jens Wiklander Date: Wed, 7 Jul 2021 08:54:19 +0200 Message-ID: Subject: Re: [PATCH v2 0/7] Asynchronous notifications from secure world To: Sumit Garg Cc: Marc Zyngier , Linux Kernel Mailing List , linux-arm-kernel , OP-TEE TrustedFirmware , Devicetree List , Linux Doc Mailing List , Jerome Forissier , Etienne Carriere , Vincent Guittot , Rob Herring , Jonathan Corbet , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Jul 7, 2021 at 7:52 AM Sumit Garg wrote: > > On Tue, 6 Jul 2021 at 18:16, Marc Zyngier wrote: > > [snip] > > > > - Is there any case where you would instead need a level interrupt > > > > (which a SGI cannot provide)? > > > > > > I think SGI should be sufficient to suffice OP-TEE notifications use-case. > > > > I don't care about OP-TEE. If you are proposing a contract between S > > and NS, it has to be TEE and OS independent. That's how the > > architecture works. > > > > Agree, here we are not proposing a common contract among the S and NS > world that every TEE (based on Arm TrustZone) will use to communicate > with REE (Linux in our case) but rather an OP-TEE specific > notifications feature that is built on top of OP-TEE specific ABIs. > > And I can see your arguments coming from an FFA perspective but there > are platforms like the ones based on Armv7 which don't support FFA > ABI. Maybe Jens can elaborate how this feature will fit in when FFA > comes into picture? OP-TEE has one official ABI at the moment, the SMC based one. It's about to get another one based on FF-A instead. The two ABIs will never be used at the same time. It's a build time option for the OP-TEE firmware to either use SMC or FF-A based communication. The patches I've posted here concern the SMC based ABI. Asynchronous notification in OP-TEE with a FF-A based ABI will use the notification framework provided by FF-A instead to implement that counterpart provided by these patches. So the OP-TEE driver here in the kernel will use the FF-A framework in the kernel instead of registering an interrupt handler directly. Cheers, Jens