Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp361325pxy; Wed, 5 May 2021 04:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH0CFjuMv/EnUFXHjN6UWOtCkLboK1vd1AY1PtMsJwQ6Xr8TYIzJWcVpIqIkpyIKHOszj4 X-Received: by 2002:a17:902:9693:b029:ee:851f:22e1 with SMTP id n19-20020a1709029693b02900ee851f22e1mr30051643plp.79.1620213114595; Wed, 05 May 2021 04:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620213114; cv=none; d=google.com; s=arc-20160816; b=vXbVu0T37jHBHQBi2X+QShinlpWvOIlJjHDmxs/sPUrgL2A5ouxu5vLvMNlfvk2c35 hUbnmqGC+RBvqzccPmHBnGTSiAor6mWSCD871MGahavIu/aPWIyatRF/K7S9EEAFLTdQ dd3fmcboP81dIrFSZbo7GvpU548Z51eCh0n7k41TaTfyc+uaBhSR/YF8orbD74RSVaE/ ITCCxpIkQ9HMPG8v9lLWCg7cFSfGAHOG2ftvgdq21r/MzfnbfMXKPMlZBMYeet5gSbHm +aQ5Q8ubf+sCoQhlulAe/h3Pb9/8ccytudbo6Y1k48pvIBwhHrueVKJMwS/NIQYVbZ43 QS9Q== 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=BXOPEgevTuuM7YW5o4XEB+yh8uQ/yRiyPYvEuyt9rlk=; b=V02xsD/+V34rM8ASf1364+HptSgSVaDXM5DfaOyX85pJFgYF6mSu+RDTE/5Iw+OR1i EdhIs+6aVxz+lgz5ppjoz7VUxZHTkS6Dz+gdM02NwOGXW+7momjQZEhxanqXO1ePyNAw hUTtTKI+dib3KQlRmHUYNAso8sHobyP1ZHuiT9O8zCedft5ysYPogTpJgCmHQEanpVtE Z7RpcXTFQhe5ovp9PDvoxOhNdKrq01AFy1B/kBOo3ihKIHD5p6Rtw+LJbCIvfxufwmXJ NXGT2McRWxPby+G50EaiWhVWB/GxeKMFjMp0vKSP/gmDpJlPz0v+D9oYz5h62qr4mmgo Au1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANuorpiu; 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 fw7si20456689pjb.2.2021.05.05.04.11.41; Wed, 05 May 2021 04:11:54 -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=ANuorpiu; 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 S232734AbhEELKa (ORCPT + 99 others); Wed, 5 May 2021 07:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbhEELK2 (ORCPT ); Wed, 5 May 2021 07:10:28 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74CDC061574 for ; Wed, 5 May 2021 04:09:29 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id a10-20020a05600c068ab029014dcda1971aso1072677wmn.3 for ; Wed, 05 May 2021 04:09:29 -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=BXOPEgevTuuM7YW5o4XEB+yh8uQ/yRiyPYvEuyt9rlk=; b=ANuorpiua0sGgLlVBH2gdNw0j0TpmyM8D/T6TBE666cw43U0J5AASfftojQGfhRT+r KKYkKgN2aqIx7jAsUD/tejnQ3QSPpGMcFtDJYDJqEUVAaZPykkGVKC6I+IzJifykGBUP RsKWslk3Rv+NenACT2hX862+jkr/r98KS1a711Qgj0T3NcY2rkzXYrANQ+t8H6yqywdQ 0olQA0btEKn2Daqpq7JPbQfhw59sWYYLRPWErF17BaDwgMEGwpB3x/C9sMj5bi97eMiD tyedil6vbMW4CQHCppzAepeOGmdTA7eGSne9mOM9PrYn5nOf5FZ1gzsgYgaEPmPnjuO/ zOGQ== 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=BXOPEgevTuuM7YW5o4XEB+yh8uQ/yRiyPYvEuyt9rlk=; b=OOHDCTYP2Tyk4eoTRdlA0hnxVXSa+fj09IDlKquXD1Z5jNeOY1MBKZsKh4oFj71eXY Ckb4oYi46zoaJW8mjaJwuw9pv4xlk4dIm9tgE8xtjwxooPZlSsDGjEd/1hhiuG4GxrOf Xxh/CTBHNZTStNKlfdO+8XHYO9l1J/RlYYs/8jt0fmP0/BQ65bxtUk5ufphCQwvHQCyn ltqr6V2pmLF7j3lSBRNCud0FB2ewE3q99qq5aPWltMsHOtJuh5NQ65034bLSagl6wT9P V86cVtFqE8CVliRlCkNAFAvrdYlfpor14iIEUOwtXP+uu7icJ4UxA9a3m+EUOae7g+tp 1LsQ== X-Gm-Message-State: AOAM531XJ8bxcwm1Wfqu0zxwt468LLncXCSQHr5rGZMawJrdWF5RbfMO YogsQd2FWzYqTEJbefjqYstlgXKPLc6FBlLRG0jklQ== X-Received: by 2002:a1c:9a88:: with SMTP id c130mr32441575wme.3.1620212968537; Wed, 05 May 2021 04:09:28 -0700 (PDT) MIME-Version: 1.0 References: <5057c53afb568fa70234de2f23b0ffeff75af426.1618421014.git.Rijo-john.Thomas@amd.com> <5072c20c-7912-4307-6e04-caa1fe54bf1a@amd.com> <20210503114734.GI21598@kadam> <01387b92-263c-edf1-52bf-b2244ebbd311@amd.com> In-Reply-To: <01387b92-263c-edf1-52bf-b2244ebbd311@amd.com> From: Jens Wiklander Date: Wed, 5 May 2021 13:09:17 +0200 Message-ID: Subject: Re: [PATCH v3] tee: amdtee: unload TA only when its refcount becomes 0 To: Rijo Thomas Cc: Dan Carpenter , Devaraj Rangasamy , Mythri Pandeshwara krishna , OP-TEE TrustedFirmware , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 4, 2021 at 6:26 AM Rijo Thomas wrote: > > > > On 03/05/21 5:17 pm, Dan Carpenter wrote: > > On Mon, May 03, 2021 at 09:04:35AM +0530, Rijo Thomas wrote: > >> > >> > >> On 14/04/21 11:08 pm, Rijo Thomas wrote: > >>> Same Trusted Application (TA) can be loaded in multiple TEE contexts. > >>> > >>> If it is a single instance TA, the TA should not get unloaded from AMD > >>> Secure Processor, while it is still in use in another TEE context. > >>> > >>> Therefore reference count TA and unload it when the count becomes zero. > >>> > >>> Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") > >>> Reviewed-by: Devaraj Rangasamy > >>> Signed-off-by: Rijo Thomas > >> > >> Hi Dan, > >> > >> Can you please give an Ack if you are okay with this patch. > >> I have incorporated your review comments for v2. > >> > > > > Oh, Sorry. Thanks! > > > > Acked-by: Dan Carpenter > > Thanks Dan! > > Jens, can you please pull in this patch. Done! Cheers, Jens