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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52211C36005 for ; Mon, 28 Apr 2025 09:07:23 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4ZmHdj3mckz2yrV; Mon, 28 Apr 2025 19:07:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1745826576; cv=none; b=OQrOWllGoZy2pUcSQ216und/ALmnFIBPyDWVi85dP9bdK0SZMAiHVHSwMFI+kixjUl45XbjmdAn2sAEAfBNJuDTxg2fmw1U+XHy0QMp27aduwpERhgBREQtVZvM7mUS+c9hemacP7CbdElBUnZlCMv1CyCtmpv+djleloHNOBcnddmcY9azLDJ0KjE5VyzVKvgH1BrMG17A8oeZ3uobebYxRj2cUNe8rNoy5k7+AK9Orldt/WXzY2MPucKQeQz/YfmuFXxCRkOqbQFTXLFXUIJR7XKqfwvlOyM8OI7DBGikqc1ECz3zFutQnd1bpVMG3BNNuueDodXdPy3T1k8xBfw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1745826576; c=relaxed/relaxed; bh=ZHvvHhceHa8plRP4xtRJKiJR0MG9BOvLLfDUR5Tau4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eEfBXpt0xNCU0exKVgGTw4NEgmG5k0Kuy6qej/8J7UVHZPq1229TxNuQxwmzLgBJ8ZLGll0E/CkFo7c321BKbdUdCm01O+B1lMu6hjI+1CZ8q2MRjzNB4SouXdXh6iBSn43NE4w6o9PZlmbrwuARxsKQyDxD05ldCv8kgKHV+kcFYJSfq+tcqDoI9bIu1Mc1SNA3WsFMxDkEeaVhmc4vHNcaMydtjdz2KHRjwqsQLGkpM1oPqHGLLJpFbQNRxkJzOxrk3HBsGoBxKP+6EUXsvC1B4VZHUSL0YcWaUFu4nYsuUv7CmhiGiy+pW6WvZZ3yPSqKTzs/Q8pvWcwrzyS4BA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uPximnop; dkim-atps=neutral; spf=pass (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=sumit.garg@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uPximnop; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=sumit.garg@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4ZmFvz4Jryz2yfy for ; Mon, 28 Apr 2025 17:49:35 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A3F1C5C5FAA; Mon, 28 Apr 2025 07:47:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02BD6C4CEEC; Mon, 28 Apr 2025 07:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745826572; bh=gz3v87ioQs5PO0ngRoziti1AQO3BGFw3wZSaC9CSs8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uPximnopkAxrgRV655KCEfhvJ1fjCkHn8Cnxg5LGMEmrjp+Wb0hcUOj1p00wqeqUO dzJlkTJF0OCpYhqD3T2sHusjTHmrV8HhuFPzeYoC9V6RUTrTkB/0j/UJBuE23ZJbIK TWcyt2JNxEdwdo7bsUjYx8qw7JVCoLMq6jNtjD7NTLAdkRqg7c9ooybXK1uMDVJDlo vfCdlKGblIlmWtEeht8ssisgKsw3pxrKias4RnPnfsZtslh2PmIMouwpR316bapMvJ 8JhEytjwyJYy+Vj9ezr4IpLOfyTyA3Y3d6rwFgAw1qPRi8CXbojTuvkhgv2nhhkGjH iQMcp72gl2QeA== Date: Mon, 28 Apr 2025 13:19:24 +0530 From: Sumit Garg To: Stefano Garzarella Cc: Jens Wiklander , Jarkko Sakkinen , Christophe Leroy , Peter Huewe , Alexandre Belloni , Claudiu Beznea , Naveen N Rao , Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, Nicolas Ferre , Michael Ellerman , Madhavan Srinivasan , James Bottomley , linux-integrity@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Gunthorpe Subject: Re: [PATCH v3 3/4] tpm/tpm_ftpm_tee: support TPM_CHIP_FLAG_SYNC Message-ID: References: <20250414145653.239081-1-sgarzare@redhat.com> <20250414145653.239081-4-sgarzare@redhat.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 14, 2025 at 04:59:47PM +0200, Stefano Garzarella wrote: > On Mon, 14 Apr 2025 at 16:57, Stefano Garzarella wrote: > > > > From: Stefano Garzarella > > > > This driver does not support interrupts, and receiving the response is > > synchronous with sending the command. > > > > So we can set TPM_CHIP_FLAG_SYNC to support synchronous send() and > > return responses in the same buffer used for commands. This way we > > don't need the 4KB internal buffer used to cache the response before > > .send() and .recv(). Also we don't need to implement recv() op. > > > > Signed-off-by: Stefano Garzarella > > --- > > v2: > > - set TPM_CHIP_FLAG_SYNC and support it in the new send() > > - removed Jens' T-b > > @Jens @Sumit can you test/review this patch again since from v1 we > changed the core a bit adding TPM_CHIP_FLAG_SYNC instead of > send_recv() op? Reviewed-by: Sumit Garg -Sumit