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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 ABB5BC433F5 for ; Wed, 13 Apr 2022 16:44:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5470A82F37; Wed, 13 Apr 2022 16:44:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6D-Idpbea5Om; Wed, 13 Apr 2022 16:44:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3AC9C8291C; Wed, 13 Apr 2022 16:44:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 10C08C002F; Wed, 13 Apr 2022 16:44:23 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 841E6C002C for ; Wed, 13 Apr 2022 16:44:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6F34482B97 for ; Wed, 13 Apr 2022 16:44:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02F1d-NA5-h8 for ; Wed, 13 Apr 2022 16:44:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9C46A8291C for ; Wed, 13 Apr 2022 16:44:20 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 8FC2568AFE; Wed, 13 Apr 2022 18:44:15 +0200 (CEST) Date: Wed, 13 Apr 2022 18:44:15 +0200 From: Christoph Hellwig To: Robin Murphy Subject: Re: [PATCH] dma-direct: avoid redundant memory sync for swiotlb Message-ID: <20220413164415.GA31640@lst.de> References: <20220412113805.3210-1-chao.gao@intel.com> <20220413010157.GA10502@gao-cwp> <20220413045958.GA31209@lst.de> <4a993382-6a29-a0f4-4600-90ab60ad982a@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4a993382-6a29-a0f4-4600-90ab60ad982a@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Kevin Tian , Wang Zhaoyang1 , linux-kernel@vger.kernel.org, Gao Liang , iommu@lists.linux-foundation.org, Christoph Hellwig X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Apr 13, 2022 at 02:10:56PM +0100, Robin Murphy wrote: > Are you sure? AFAICS swiotlb_map() does the right thing, and > dma_direct_{sync,unmap} are working off the DMA address, which is that of > the bounce slot when SWIOTLB is involved (not least, how would the > is_swiotlb_buffer() checks work otherwise?) Yeah, actually this should be fine. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 434FBC433FE for ; Wed, 13 Apr 2022 16:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237025AbiDMQrQ (ORCPT ); Wed, 13 Apr 2022 12:47:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234436AbiDMQqr (ORCPT ); Wed, 13 Apr 2022 12:46:47 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9896BF45 for ; Wed, 13 Apr 2022 09:44:18 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 8FC2568AFE; Wed, 13 Apr 2022 18:44:15 +0200 (CEST) Date: Wed, 13 Apr 2022 18:44:15 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Chao Gao , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, m.szyprowski@samsung.com, Wang Zhaoyang1 , Gao Liang , Kevin Tian Subject: Re: [PATCH] dma-direct: avoid redundant memory sync for swiotlb Message-ID: <20220413164415.GA31640@lst.de> References: <20220412113805.3210-1-chao.gao@intel.com> <20220413010157.GA10502@gao-cwp> <20220413045958.GA31209@lst.de> <4a993382-6a29-a0f4-4600-90ab60ad982a@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a993382-6a29-a0f4-4600-90ab60ad982a@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 02:10:56PM +0100, Robin Murphy wrote: > Are you sure? AFAICS swiotlb_map() does the right thing, and > dma_direct_{sync,unmap} are working off the DMA address, which is that of > the bounce slot when SWIOTLB is involved (not least, how would the > is_swiotlb_buffer() checks work otherwise?) Yeah, actually this should be fine.