Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1176433imu; Wed, 16 Jan 2019 14:11:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN4kw+MYlLzItbxS6qaEEW9hqpCpvUKjLPSVmQonTZEdSPQn9ujBaFRjQ3Z9Yyn5L7YJ4CVC X-Received: by 2002:aa7:810c:: with SMTP id b12mr12075555pfi.44.1547676672655; Wed, 16 Jan 2019 14:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547676672; cv=none; d=google.com; s=arc-20160816; b=bjevzyHyIAcNwgpR0WSKRyRooUeRFYg2odtfY6DWHuAetgXHnKjNphSIpiSXl1zSpp vUa6MkYC4h9Pf+zcrOxaD0jAqxLXWeCeVhTFImUG3sNNlDRLvyFQLK15/Dd09rKnRlRi VI2arSqdayjk05mJv/u0/giNqDPaT1F5+qgzDxicR+vg+PNCwhZ3a31VmZkuudzUJFBW yMtE97m9Cc0kL++jMRcjwjDBsdsc9f0UIw8KMEoODie0UmJiHap4kOCZnUQZScMWjqeN FUe4Bw0jSrbLExdYOnO+pjOl/M42J/Cc6A3RDhdMpX1pB8kkk/0JT+fiephTaySmoWxO 5i4w== 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=i8i03jQrQgNCmaTVy8JBnPECuoVUj8+/fydT3plohk8=; b=rwJ6evjmVRWoL2jT8DJRZJMRehIkCuChCSAeUtDAyfQ66z2W8glfNZIfZosIONisyG iUTVcH6fbC7FDvw7kzsGcHjckEkFPoD7IJ4OtER73W/Iyhl910+H5qeJD/9q8u3B6Zft GShw6v8jowEUgXk6wG9w9GCou+ZJ6bhT3gusUF0eXcteaX0CqA0nf3yBVwbMto1XQzNO FuEqXONWIuvYuBarApQ3/smi4tP/w72G5QltW5yrwjhwaYe3iTCbn/6f2EdExx328v/x whHLBfhjw8Ry4x8+JDXpqSXlNIFDNx19dIncWvuYXHo/KGVojgGWhtwFMxFtBD60qDPa TOdA== 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 p15si7402208plq.24.2019.01.16.14.10.57; Wed, 16 Jan 2019 14:11:12 -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 S2403764AbfAPOKr (ORCPT + 99 others); Wed, 16 Jan 2019 09:10:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:33094 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733044AbfAPOKr (ORCPT ); Wed, 16 Jan 2019 09:10:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F187EAF31; Wed, 16 Jan 2019 14:10:45 +0000 (UTC) Date: Wed, 16 Jan 2019 15:10:43 +0100 From: Joerg Roedel To: "Michael S. Tsirkin" Cc: Joerg Roedel , 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 Subject: Re: [PATCH 3/3] virtio-blk: Consider dma_max_mapping_size() for maximum segment size Message-ID: <20190116141043.qbsdbdt72akxpdtj@suse.de> References: <20190115132257.6426-1-joro@8bytes.org> <20190115132257.6426-4-joro@8bytes.org> <20190116090355-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190116090355-mutt-send-email-mst@kernel.org> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 09:05:40AM -0500, Michael S. Tsirkin wrote: > On Tue, Jan 15, 2019 at 02:22:57PM +0100, Joerg Roedel wrote: > > + max_size = dma_max_mapping_size(&vdev->dev); > > + > > > Should this be limited to ACCESS_PLATFORM? > > I see no reason to limit this without as guest can > access any memory. Actually, yes. This should be inside a use_dma_api check. I had it in v1, but it went away without the vring layer for propagating the limit. I'll add that again. Thanks, Joerg