Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753781AbcD0SSJ (ORCPT ); Wed, 27 Apr 2016 14:18:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45256 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753739AbcD0SSF (ORCPT ); Wed, 27 Apr 2016 14:18:05 -0400 Date: Wed, 27 Apr 2016 21:17:57 +0300 From: "Michael S. Tsirkin" To: David Woodhouse Cc: Joerg Roedel , Kevin Wolf , Wei Liu , Andy Lutomirski , qemu-block@nongnu.org, Christian Borntraeger , Jason Wang , Stefano Stabellini , qemu-devel@nongnu.org, peterx@redhat.com, linux-kernel@vger.kernel.org, Amit Shah , iommu@lists.linux-foundation.org, Stefan Hajnoczi , kvm@vger.kernel.org, cornelia.huck@de.ibm.com, pbonzini@redhat.com, virtualization@lists.linux-foundation.org, Anthony PERARD Subject: Re: [PATCH V2 RFC] fixup! virtio: convert to use DMA api 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 Content-Disposition: inline In-Reply-To: <1461770135.118304.152.camel@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1195 Lines: 34 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