From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH V2 RFC] fixup! virtio: convert to use DMA api Date: Wed, 27 Apr 2016 21:17:57 +0300 Message-ID: <20160427211635-mutt-send-email-mst@redhat.com> References: <1461245745-6710-1-git-send-email-mst@redhat.com> <20160421135416.GE11775@citrix.com> <1461759501.118304.149.camel@infradead.org> <20160427153345-mutt-send-email-mst@redhat.com> <20160427142331.GH17926@8bytes.org> <20160427172630-mutt-send-email-mst@redhat.com> <20160427145632.GI17926@8bytes.org> <20160427180007-mutt-send-email-mst@redhat.com> <1461770135.118304.152.camel@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1461770135.118304.152.camel@infradead.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-block-bounces+gceqb-qemu-block=m.gmane.org@nongnu.org Sender: "Qemu-block" To: David Woodhouse Cc: Kevin Wolf , cornelia.huck@de.ibm.com, Wei Liu , Stefan Hajnoczi , qemu-block@nongnu.org, Stefano Stabellini , Joerg Roedel , qemu-devel@nongnu.org, peterx@redhat.com, linux-kernel@vger.kernel.org, Christian Borntraeger , iommu@lists.linux-foundation.org, Andy Lutomirski , kvm@vger.kernel.org, Amit Shah , pbonzini@redhat.com, virtualization@lists.linux-foundation.org, Anthony PERARD , Jason Wang List-Id: iommu@lists.linux-foundation.org On Wed, Apr 27, 2016 at 04:15:35PM +0100, David Woodhouse wrote: > On Wed, 2016-04-27 at 18:05 +0300, Michael S. Tsirkin wrote: > > > > I really don't get it. > > > > There's exactly one device that works now and needs the work-around and > > so that we need to support, and that is virtio. It happens to have > > exactly the same issue on all platforms. > > False. We have other devices which are currently *not* translated by > the emulated IOMMU and which aren't going to be in the short term > either. > > We also have other devices (emulated hardware NICs) to which precisely > the same "we don't need protection" arguments apply, and which we > *could* expose to the guest without an IOMMU translation if we really > wanted to. It makes as much sense as exposing virtio without an IOMMU, > going forward. The reasons for virtio are mostly dealing legacy. We don't need protection is a separate issue that I'd rather drop for now. > > Why would we want to work hard to build platform-specific > > solutions to a problem that can be solved in 5 lines of > > generic code? > > Because it's a dirty hack in the *wrong* place. No one came up with a better one so far :( > -- > dwmw2