From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78D01C8CE; Fri, 8 Nov 2024 15:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731078312; cv=none; b=dYFN2sxvmDI2/9NqsVP1FrsAwrhUNiXSPD1lb/26xtt+Rh05LfMgDyrFFsRxE57YZr8KjuWU2SJTg4mnOgkL4dXo7yh7uOFe9rwZEACZD5ROILgocm7Wt0MzjMRSMc2CPIWtkMvCINnfm6zWnki5n9rqXIY5YxCoRv1230tEznY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731078312; c=relaxed/simple; bh=OIsdftTaHk1yZNuKlnX6gWl7hjUIgMKtYk0UjJl66XU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IjAQWX4IB43OZRUOeRQfaAvr8LOc1H1dxKjP4oV4YZDR1SAWv+QF43vMk4p361q+fiPmXAjMm7jrnnBzkWRveR6ZLBD+8/BZJwXKbbO/ycoeXbMmPnOA22R5Whv10mHfSxhbU09iKClbn7V2RjJaY/34Gn6Em0s6kJmH9u+UdfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 0848268AA6; Fri, 8 Nov 2024 16:05:01 +0100 (CET) Date: Fri, 8 Nov 2024 16:05:00 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Robin Murphy , Leon Romanovsky , Jens Axboe , Joerg Roedel , Will Deacon , Sagi Grimberg , Keith Busch , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , Marek Szyprowski , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, matthew.brost@intel.com, Thomas.Hellstrom@linux.intel.com, brian.welty@intel.com, himal.prasad.ghimiray@intel.com, krishnaiah.bommu@intel.com, niranjana.vishwanathapura@intel.com Subject: Re: [PATCH v1 00/17] Provide a new two step DMA mapping API Message-ID: <20241108150500.GA10102@lst.de> References: <3567312e-5942-4037-93dc-587f25f0778c@arm.com> <20241104095831.GA28751@lst.de> <20241105195357.GI35848@ziepe.ca> <20241107083256.GA9071@lst.de> <20241107132808.GK35848@ziepe.ca> <20241107135025.GA14996@lst.de> <20241108150226.GM35848@ziepe.ca> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241108150226.GM35848@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Nov 08, 2024 at 11:02:26AM -0400, Jason Gunthorpe wrote: > It is fully OK? Can't dma_map_page() trigger swiotlb? It must not do > that for P2P. How does it know the difference if it just gets a phys? dma_direct_map_page checks for p2p pages in the swiotlb bounce path already in the current kernel, and dma_map_sg relies on exactly that check to prevent bouncing for p2p.