Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1550229lql; Wed, 13 Mar 2024 00:46:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUudTUgIBuhSPiI0t2psH4W/80o2Jx/AzXw97i5psBU2lWelbmbOLShTouFAf5gmluH+Y/ZevfMYTUxwHzCHUZ+pX9xP1VZXBlEG53JcQ== X-Google-Smtp-Source: AGHT+IGlvkRf+sRuIQNrfHvcuf5dDlqhi/GyAvENGzB3jYHmRJ1gP+2GhCgS+c5Rg+VSa7HuNmXB X-Received: by 2002:a9d:7592:0:b0:6e5:37c:b7fa with SMTP id s18-20020a9d7592000000b006e5037cb7famr2272151otk.38.1710316018038; Wed, 13 Mar 2024 00:46:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710316018; cv=pass; d=google.com; s=arc-20160816; b=y6QY0+6GKO+aHU0aZvT2P9Unuk/gAVt9kAU1LdTnbE97rWdDX9SHs00molnJb1zwIi tYNSdHZddV1wNaXjaYPtQro8UXHfLkTuTnY6c4YE3JazGsrBw9ZsFw+TuketKrBWd56n MZiXTWNd4HrHwjEzNLuTvpGpzNnWsXprfUsu9vCzaCV4gOPufKLcxX6d84cqWFd44y6M Ttl9lPK2rBFTwNFjTGlvka+ajdP6klHeX245zLUWSzdXy9+2kADMBAGmQo1xRsZ4a8Fz DcXvnSX/cFzmBM5sydtRbNZgGV3gYzreGtJ3+TuHF2ITmiVcpD2E7EkVKCpo0cVdKO0Q BjGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oFPojxUGJwzVDoSGUKb9k5Rr3J1glGg6PTtT6ACJHaM=; fh=mmnNvQFOHfrcFNkckn4nYsZKC3OV9HVJBN8A5eqeywY=; b=Prth+P3Mcm31o/WTGGkqAOp/JjEQsKCUOTkOtgEgU5BX5cJyqJN3qsSXo+/Jqvrdsf 4QpqkU1d+vdxTy2mUGj6fyYdm0ysK648odIaUW5PaeRyjFOPObCxemQYr+N4RpQn8utY oLYwjAi47WAv5J79h8IpB3ww1QPWBnpW9zXIg4O4zoepPx2kmBJB7cnh/Q6GPuzqzt+Q X/r4BAMxLLtqwpsYGGCHKY90WSoveQwarPl+3AuwRMXrgJJYBVbEajFcCOA1j3Ey28tr ErTkE8GIXYHnV5LLcRNPjrUUxibaRWbhMuLtrt1TTvQaHXzCOw+Mt6R4yM1Ekks9Mhtr xjkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LhEelchk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u11-20020a63790b000000b005e42b580aadsi8435220pgc.393.2024.03.13.00.46.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 00:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LhEelchk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E53C3B20EC9 for ; Wed, 13 Mar 2024 07:46:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B37A217BC7; Wed, 13 Mar 2024 07:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LhEelchk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C245B168A4; Wed, 13 Mar 2024 07:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316002; cv=none; b=oUwc19y3TeOYw6Yz20UJ6ZoIP+uXcMsbzyW3rFc+14q/EqC+z3e6ZBAyUhnjX7hnXXDRv78eXvD5qxy+tyS945obQrvRyft8oAUpn3uGRIpWXwWrepS/NalFAd5pU94H8JY3HF1uzD9kW9UdRJN2M9rFBRyT1kO4UBsQtsAY3LU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710316002; c=relaxed/simple; bh=Kr6b9zwRiK0qe/FQtkWwwcr3AdM/iJQ3Tm5R/ItJ+kI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZzzKYY6tdF986EFgY6aY8gXblb3HNNoadhdOnu2oRQ5GQ9fU95kmn5Xs/iuLlfcb5ow+69HBdBgG13Q+Y5CDGkDqQD9XYAsEvyIdKmKgQdDbjnwKAhvL51/P07Px3TStrYUAjGmUSIowENfClE/QrapjkFdF41UeguhEUW8PCRs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LhEelchk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0F8EC433C7; Wed, 13 Mar 2024 07:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710316001; bh=Kr6b9zwRiK0qe/FQtkWwwcr3AdM/iJQ3Tm5R/ItJ+kI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LhEelchk241d2G+Q3NZ+eugtycNa64C11tlGZNDKxCvzTX75Q00BDeucxxI33dSuA 4+eCRt8kMMEc5PKj3RKm6EMledYaAfqv5JZuQB7Y+lqGf4dv4bsr9x0TpKJG1q4wXj 5wL8HqXvVMagJHMFg5lnkHWIqzUSGVvjZwviYWQ8IepvQMcWBnKkAG8KoyC2Qj/Dk9 zhjs+9wAPOXEebb1i/MdTgpoDqE40AetcQZI0F5BBxVL9DwWbmHiXrd3y6wILhONqN 9PPx8kGlpLaHCN3ApgnEaZsraA27U8tPpWQjwzmxyOAzAxTPkrSjUTlSjBaxCZCGej iazuJwD6oD4iQ== Date: Wed, 13 Mar 2024 09:46:36 +0200 From: Leon Romanovsky To: Christoph Hellwig Cc: Jason Gunthorpe , Robin Murphy , Marek Szyprowski , Joerg Roedel , Will Deacon , Chaitanya Kulkarni , Jonathan Corbet , Jens Axboe , Keith Busch , Sagi Grimberg , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , 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, kvm@vger.kernel.org, linux-mm@kvack.org, Bart Van Assche , Damien Le Moal , Amir Goldstein , "josef@toxicpanda.com" , "Martin K. Petersen" , "daniel@iogearbox.net" , Dan Williams , "jack@suse.com" , Zhu Yanjun Subject: Re: [RFC RESEND 00/16] Split IOMMU DMA mapping operation to two steps Message-ID: <20240313074636.GV12921@unreal> References: <20240306174456.GO9225@ziepe.ca> <20240306221400.GA8663@lst.de> <20240307000036.GP9225@ziepe.ca> <20240307150505.GA28978@lst.de> <20240307210116.GQ9225@ziepe.ca> <20240308164920.GA17991@lst.de> <20240308202342.GZ9225@ziepe.ca> <20240309161418.GA27113@lst.de> <20240310093513.GB12921@unreal> <20240312212844.GA3018@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240312212844.GA3018@lst.de> On Tue, Mar 12, 2024 at 10:28:44PM +0100, Christoph Hellwig wrote: > On Sun, Mar 10, 2024 at 11:35:13AM +0200, Leon Romanovsky wrote: > > And you will need to have a way to instruct that pin_user_pages() variant > > to continue anyway, because you asked for FOLL_PCI_P2PDMA. Without that > > force, you will have !FOLL_PCI_P2PDMA behaviour. > > I don't understand what you mean. Jason talked about the need to call to pin_user_pages(..., gup_flags | FOLL_PCI_P2PDMA, ...), but in your proposal this call won't be possible anymore. > > > When you say "simplify the overall interface", which interface do you mean? > > Primarily the dma mapping interface. Secondarily also everything around > it. OK, thanks