[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160427180007-mutt-send-email-mst@redhat.com>
Date: Wed, 27 Apr 2016 18:05:51 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Joerg Roedel <joro@...tes.org>
Cc: David Woodhouse <dwmw2@...radead.org>,
Kevin Wolf <kwolf@...hat.com>, Wei Liu <wei.liu2@...rix.com>,
Andy Lutomirski <luto@...nel.org>, qemu-block@...gnu.org,
Christian Borntraeger <borntraeger@...ibm.com>,
Jason Wang <jasowang@...hat.com>,
Stefano Stabellini <stefano.stabellini@...citrix.com>,
qemu-devel@...gnu.org, peterx@...hat.com,
linux-kernel@...r.kernel.org, Amit Shah <amit.shah@...hat.com>,
iommu@...ts.linux-foundation.org,
Stefan Hajnoczi <stefanha@...hat.com>, kvm@...r.kernel.org,
cornelia.huck@...ibm.com, pbonzini@...hat.com,
virtualization@...ts.linux-foundation.org,
Anthony PERARD <anthony.perard@...rix.com>
Subject: Re: [PATCH V2 RFC] fixup! virtio: convert to use DMA api
On Wed, Apr 27, 2016 at 04:56:32PM +0200, Joerg Roedel wrote:
> 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.
Going forward, this might be reasonable. Of course it didn't in the past
and no one cared because virtio devices used physical addresses. We have
to keep these setups working.
> > 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
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.
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?
--
MST
Powered by blists - more mailing lists