From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 4/5] virtio: Introduce virtio_max_dma_size() Date: Tue, 29 Jan 2019 18:13:34 +0100 Message-ID: <20190129171334.GD15195__24491.9823527866$1548825529$gmane$org@lst.de> References: <20190129084342.26030-1-joro@8bytes.org> <20190129084342.26030-5-joro@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190129084342.26030-5-joro@8bytes.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Joerg Roedel Cc: Jens Axboe , jon.grimm@amd.com, brijesh.singh@amd.com, Konrad Rzeszutek Wilk , "Michael S . Tsirkin" , jfehlig@suse.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, iommu@lists.linux-foundation.org, jroedel@suse.de, Christoph Hellwig List-Id: virtualization@lists.linuxfoundation.org On Tue, Jan 29, 2019 at 09:43:41AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > This function returns the maximum segment size for a single > dma transaction of a virtio device. The possible limit comes > from the SWIOTLB implementation in the Linux kernel, that > has an upper limit of (currently) 256kb of contiguous > memory it can map. Other DMA-API implementations might also > have limits. > > Use the new dma_max_mapping_size() function to determine the > maximum mapping size when DMA-API is in use for virtio. > > Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Joerg Roedel Looks good, Reviewed-by: Christoph Hellwig