Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4894615imu; Tue, 29 Jan 2019 09:15:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN7diBt3mzsAL9I1obmRHRJPpRtL2bKu06yOz+nEjPgv4RVL0uEY7j8TDN9xCjgroFWvaV7h X-Received: by 2002:a17:902:1122:: with SMTP id d31mr26689644pla.246.1548782100776; Tue, 29 Jan 2019 09:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548782100; cv=none; d=google.com; s=arc-20160816; b=RUa3FTE653XG7W+2djDXztfhCnjGRPnGlPgoYh6d4zdr2Bu7cwzKePb5EtV2FhFD5x HVhcAGC3E/N27chOV5LFP4HzH968UagBv+X4DFVNAA8JmjB143vUuOCglwpi0RTmJWWC Ukf1mngLoiRQRku5SgLmGdM6nLW4jhcbCPBNKtCpMx+0MEWJb/CRICFSQiXPNmMBtoec ZStovXHAdKVAlRDGVvR5LlcFae865lK0mffzMsYpctEccarsjGVUaO2zNjqvs6xpNiIx 1OZAvq8O2NbCS9ilygokwrOldAypiEfJ7Z4HDP5UZGw5zsnJGfyxmXevKhHSg/rUMFLn C4Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dRshZR6uhKQ7BBLORLF4+Kp+7+qiDEPGqG6kk1INxck=; b=Gf5LnODPmZvekTuk8NouoXgag553qp38cuMILhTKyY0Ugp3zBIqGyU9SsOS/Af0Y++ 80HtEd6r2bzd48/c6UqJlfcaq9RY1gTKscSs4fc9v5haIN7LbnbLgrEBlFfHzlilXz8s MXFZnyJmH5rvyVflVPQf/2HqbgJwf067s6WtG4sod22hTOL51hcdmnD3b0mHq22JK/BX tHSwkPXEPqa4Ib8EF7GWAkqNPNYKiZKyZ+KIw+QT0GX1D9jMFycHQR6cy8oSl7K6pPLS Ime/OKdyk9uZfgGEzgYiwk+R5QXTZKvLktRKbJWmJs+gbXFuV3Am7yxJav/Bz9DrOfgc 3h5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si5196056pgr.569.2019.01.29.09.14.30; Tue, 29 Jan 2019 09:15:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729060AbfA2RNh (ORCPT + 99 others); Tue, 29 Jan 2019 12:13:37 -0500 Received: from verein.lst.de ([213.95.11.211]:47386 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfA2RNg (ORCPT ); Tue, 29 Jan 2019 12:13:36 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id EEC9F68CEC; Tue, 29 Jan 2019 18:13:34 +0100 (CET) Date: Tue, 29 Jan 2019 18:13:34 +0100 From: Christoph Hellwig To: Joerg Roedel Cc: "Michael S . Tsirkin" , Jason Wang , Konrad Rzeszutek Wilk , Christoph Hellwig , Jens Axboe , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, jfehlig@suse.com, jon.grimm@amd.com, brijesh.singh@amd.com, jroedel@suse.de Subject: Re: [PATCH 4/5] virtio: Introduce virtio_max_dma_size() Message-ID: <20190129171334.GD15195@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-Disposition: inline In-Reply-To: <20190129084342.26030-5-joro@8bytes.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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