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 AD4C91A0AFE; Tue, 12 Nov 2024 06:01:14 +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=1731391276; cv=none; b=XqsK4fWwmVeM1chKN/RwCNziarp049uqEdkAUN4Kcby2N3S1SuFY4Z3VqWZo68p9rYixMGzzRiai+UwTLgjFNtJut8J3EXOnBquJnPhPJlK3yJE56crNvHtBiNe30YBpRrqlaiQfHL795g1voPhoKrII7RS1u3mZfUL3WBF27Kg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731391276; c=relaxed/simple; bh=0PVIDi3JGo0JcgiypZig4noJVOHBWMpTvGUyYzU70NI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hgj2O5pSu0EZjHUyEj95qgpqAXSvssBuVvK8nyj63y3Uy44jZQXh20cjjcRkFUeSBK/IZw9S/kZa2AwoM5RpUQETMfo3BrWns4SpeCbcf6FW+YYZZrxaJqGbeoup4Miaeso5H7+VBl2rZq/+NOuBrLY1vg1LvHuIDwVMAAhD7bU= 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 A286768D09; Tue, 12 Nov 2024 07:01:08 +0100 (CET) Date: Tue, 12 Nov 2024 07:01:08 +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: <20241112060108.GA10056@lst.de> References: <20241104095831.GA28751@lst.de> <20241105195357.GI35848@ziepe.ca> <20241107083256.GA9071@lst.de> <20241107132808.GK35848@ziepe.ca> <20241107135025.GA14996@lst.de> <20241108150226.GM35848@ziepe.ca> <20241108150500.GA10102@lst.de> <20241108152537.GN35848@ziepe.ca> <20241108152956.GA12130@lst.de> <20241108153846.GO35848@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: <20241108153846.GO35848@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Nov 08, 2024 at 11:38:46AM -0400, Jason Gunthorpe wrote: > > > What I'm thinking about is replacing code like the above with something like: > > > > > > if (p2p_provider) > > > return DMA_MAPPING_ERROR; > > > > > > And the caller is the one that would have done is_pci_p2pdma_page() > > > and either passes p2p_provider=NULL or page->pgmap->p2p_provider. > > > > And where do you get that one from? > > Which one? The p2p_provider thing (whatever that will actually be).