Received: by 10.213.65.68 with SMTP id h4csp321033imn; Fri, 6 Apr 2018 00:18:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ioZcULpnCiAjaFoncg2NtgJ5mhRkj7oNHoYkMPP3d6lwonehQJrkxkm0O2YG27KgSNh1V X-Received: by 10.98.171.7 with SMTP id p7mr19663940pff.215.1522999098268; Fri, 06 Apr 2018 00:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522999098; cv=none; d=google.com; s=arc-20160816; b=OqZzS60rFO6GVU6oBiDYKEulF5WWuT/FvyCE8xMXhVeJ63T4P/dlS50y+4r91cqN9o BbDITtvYFjyPOoUoLYyeiDBBXYwZB7z71q08v3HHwP3uMWkJfU6eAvj0As2KCnHQ7ODz P3z2ElpjVnMOMx9O/YAnnCtanTZB9zCoYV0VdXheNtWAP11ilGnZAdOyiVmHkSd6ceyc WurF4kKn3frm0M0iPxNc5DNe3rK1XPLvY+g/Rz2V5EE5E4i+FZ64DFzU635ee0CjIWfo WOl+QVSn4fnAydPI2jHozUpGByi8r0BZoBsbX4adiJ685N/ajtGI5SzFTz4kRUC4P3cW 3HSQ== 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:dkim-signature:arc-authentication-results; bh=k6DcLVneliiskoV/9GJnbuOLw/iEOwH77j73ixIqvFY=; b=iI2qjcYR7G5gs2xkqu0r1MFDisxdce7JfHDKYeuVa8ZcAMvqHCZKrHvxp0wNGWSUrK 0Z/pJsj1MNmWycLnrATzJUAcs7K/8RDFOJiHGFlA20DphnS9JbS6OJKh30UcQ1sKbkOn d85hV7EmjmZnBUhDWiqU+ejy5O2+Bsw15hyS7sm2nGjBTEqF3BPIrVRDEXNutp3xyDnY YL1qFV6SVCeDbiz4K5BYYhVCsEdipMnEWkCkHe7XJqzXXHTX1PUkrgHcvhhsyyWB3IlO a0jC1xmZEo2241EamLYC4oBweb/IdvVq+6gPSxu6EGM++Pbc/NxTVtnlvzX3UeTdegmV LKlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ruQN5r45; 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 w3si6647430pge.719.2018.04.06.00.18.04; Fri, 06 Apr 2018 00:18:18 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ruQN5r45; 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 S1751696AbeDFHQl (ORCPT + 99 others); Fri, 6 Apr 2018 03:16:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39472 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbeDFHQk (ORCPT ); Fri, 6 Apr 2018 03:16:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=k6DcLVneliiskoV/9GJnbuOLw/iEOwH77j73ixIqvFY=; b=ruQN5r45DJGqsJU5ik1OTz4v4 u67jbBozHykgEv0w0BWdpyDe9nEz78XT251gbLxU8gjUZHzPUygCgH/i0L4eHOfKyxi1Wx9jISWHm yPxaBW2524P7BNDF9v79ip5JE/f9yZx1dQzq2qPyv5ZeKf9Z5GN0a5TYzn1eGe5BBi7v2I0FNpMsX N67Mva3ahYU5TguvWggFhBqQHljyD/8kr/k/dLMorU6211rqD2vNw+Iq01VZOZ/n26TE4moSSksbc mNkaPc6BjbSVKRT80XkxnJvS/DSn5P1xnjn+mmw2aSyVnE9+fsSv+ekY29Rdc0K61VihA3KjmOTdY m9ZFYi1PA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f4Lbu-0002dB-QU; Fri, 06 Apr 2018 07:16:34 +0000 Date: Fri, 6 Apr 2018 00:16:34 -0700 From: Christoph Hellwig To: Anshuman Khandual Cc: Benjamin Herrenschmidt , "Michael S. Tsirkin" , robh@kernel.org, aik@ozlabs.ru, jasowang@redhat.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, joe@perches.com, david@gibson.dropbear.id.au, linuxppc-dev@lists.ozlabs.org, elfring@users.sourceforge.net Subject: Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU Message-ID: <20180406071634.GA31108@infradead.org> References: <20180405105631.9514-1-khandual@linux.vnet.ibm.com> <3e1b113b-79ca-b700-5be9-10c66d74aabe@linux.vnet.ibm.com> <20180405175326-mutt-send-email-mst@kernel.org> <1522940983.21446.205.camel@kernel.crashing.org> <20180405213042-mutt-send-email-mst@kernel.org> <1522963113.21446.211.camel@kernel.crashing.org> <70cb433f-a8f7-5199-3c96-a760c7624804@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70cb433f-a8f7-5199-3c96-a760c7624804@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 06, 2018 at 08:23:10AM +0530, Anshuman Khandual wrote: > On 04/06/2018 02:48 AM, Benjamin Herrenschmidt wrote: > > On Thu, 2018-04-05 at 21:34 +0300, Michael S. Tsirkin wrote: > >>> In this specific case, because that would make qemu expect an iommu, > >>> and there isn't one. > >> > >> > >> I think that you can set iommu_platform in qemu without an iommu. > > > > No I mean the platform has one but it's not desirable for it to be used > > due to the performance hit. > > Also the only requirement is to bounce the I/O buffers through SWIOTLB > implemented as DMA API which the virtio core understands. There is no > need for an IOMMU to be involved for the device representation in this > case IMHO. This whole virtio translation issue is a mess. I think we need to switch it to the dma API, and then quirk the legacy case to always use the direct mapping inside the dma API.