From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH V2 RFC] fixup! virtio: convert to use DMA api Date: Wed, 27 Apr 2016 16:56:32 +0200 Message-ID: <20160427145632.GI17926@8bytes.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160427172630-mutt-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Michael S. Tsirkin" Cc: Kevin Wolf , Anthony PERARD , cornelia.huck-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Wei Liu , Stefan Hajnoczi , qemu-block-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, Stefano Stabellini , Jason Wang , qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, peterx-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christian Borntraeger , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Andy Lutomirski , kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Amit Shah , pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David Woodhouse List-Id: iommu@lists.linux-foundation.org On Wed, Apr 27, 2016 at 05:34:30PM +0300, Michael S. Tsirkin wrote: > On Wed, Apr 27, 2016 at 04:23:32PM +0200, Joerg Roedel wrote: > QEMU can choose to bypass IOMMU for one device and not the other. > IOMMU in QEMU isn't involved when it's bypassed. And it is QEMU's task to tell the OS, right? And the correct way to do this is via the firmware ACPI tables. > Fine but this is beside the point. Almost all virtio devices > bypass IOMMU and what this patch does is create a way > to detect devices that don't. This code can maybe go into > platform. Again, the way to detect this is in platform code must not be device specific. This is what the DMAR and IVRS tables on x86 are for. When there is no way to do this in the firmware (or there is no firmware at all), we have to do a quirk in the platform code for it. Joerg