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 18:09:31 +0300 Message-ID: <20160427180610-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> <20160427173603-mutt-send-email-mst@redhat.com> <20160427175031-mutt-send-email-mst@redhat.com> <20160427145851.GJ17926@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160427145851.GJ17926@8bytes.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: Joerg Roedel Cc: Kevin Wolf , Anthony PERARD , Cornelia Huck , Wei Liu , Stefan Hajnoczi , qemu-block@nongnu.org, Stefano Stabellini , "linux-kernel@vger.kernel.org" , Jason Wang , "qemu-devel@nongnu.org Developers" , peterx@redhat.com, Andy Lutomirski , Christian Borntraeger , iommu@lists.linux-foundation.org, Andy Lutomirski , kvm list , Amit Shah , Paolo Bonzini , Linux Virtualization , David Woodhouse List-Id: iommu@lists.linux-foundation.org On Wed, Apr 27, 2016 at 04:58:51PM +0200, Joerg Roedel wrote: > On Wed, Apr 27, 2016 at 05:54:57PM +0300, Michael S. Tsirkin wrote: > > Point is, QEMU is not the only virtio implementation out there. > > So we can't know no virtio implementations have an IOMMU as long as > > linux supports this IOMMU. > > virtio always used physical addresses since it was born and if it > > changes that it must do this in a way that does not break existing > > users. > > FWIW, virtio in qemu can continue to just use physical addresses. But > qemu needs to advertise that fact correctly to the OS in the DMAR table. > This way old kernels (where virtio does not use DMA-API) will also > continue to work on the fixed qemu. > > > > Joerg It's not clear it can do this since DMAR tables seem to assume a given slot is either bypassing IOMMU or going through it. QEMU allows reusing same slot for virtio and non-virtio devices. Besides, this patch is not about it, it's a flag for QEMU to tell guest that it can trust DMAR tables. -- MST