From: David Woodhouse <dwmw2@infradead.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
cornelia.huck@de.ibm.com, Wei Liu <wei.liu2@citrix.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-block@nongnu.org,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Joerg Roedel <joro@8bytes.org>,
qemu-devel@nongnu.org, peterx@redhat.com,
linux-kernel@vger.kernel.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
iommu@lists.linux-foundation.org,
Andy Lutomirski <luto@kernel.org>,
kvm@vger.kernel.org, Amit Shah <amit.shah@redhat.com>,
pbonzini@redhat.com, virtualization@lists.linux-foundation.org,
Anthony PERARD <anthony.perard@citrix.com>,
Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH V2 RFC] fixup! virtio: convert to use DMA api
Date: Wed, 27 Apr 2016 20:16:57 +0100 [thread overview]
Message-ID: <1461784617.118304.181.camel@infradead.org> (raw)
In-Reply-To: <20160427211635-mutt-send-email-mst@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
On Wed, 2016-04-27 at 21:17 +0300, Michael S. Tsirkin wrote:
>
> > Because it's a dirty hack in the *wrong* place.
>
> No one came up with a better one so far :(
Seriously?
Take a look at drivers/iommu/intel-iommu.c. It has quirks for all kinds
of shitty devices that have to be put in passthrough mode or otherwise
excluded.
We don't actually *need* it for the Intel IOMMU; all we need is for
QEMU to stop lying in its DMAR tables.
We *do* want the same kind of quirks in the relevant POWER and ARM
IOMMU code in the kernel. Do that (hell, a simple quirk for all virtio
devices will suffice, but NOT in the virtio driver) at the same moment
you fix the virtio devices to use the DMA API. Job done.
Some time *later* we can work on *refining* that quirk, and a way for
QEMU to tell the guest (via something generic like fwcfg, maybe) that
some devices are and aren't translated.
Actually, I'm about to look at moving dma_ops into struct device and
cleaning up the way we detect which IOMMU is attached, at device
instantiation time. Perhaps I can shove the virtio-exception quirk in
there while I'm at it...
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]
next prev parent reply other threads:[~2016-04-27 19:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1461245745-6710-1-git-send-email-mst@redhat.com>
[not found] ` <20160421135416.GE11775@citrix.com>
2016-04-27 12:18 ` [PATCH V2 RFC] fixup! virtio: convert to use DMA api David Woodhouse
2016-04-27 13:37 ` Michael S. Tsirkin
[not found] ` <20160427153345-mutt-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-27 14:23 ` Joerg Roedel
2016-04-27 14:31 ` Andy Lutomirski
[not found] ` <CALCETrVkSSJbjoK8i7pLsSYR0o=Wy1UP-mrmn2uxYUd81g18dg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-27 14:38 ` Michael S. Tsirkin
2016-04-27 14:43 ` Andy Lutomirski
2016-04-27 14:54 ` Michael S. Tsirkin
2016-04-27 14:58 ` Joerg Roedel
2016-04-27 15:09 ` Michael S. Tsirkin
2016-04-27 15:10 ` Andy Lutomirski
2016-04-27 14:34 ` Michael S. Tsirkin
[not found] ` <20160427172630-mutt-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-27 14:56 ` Joerg Roedel
[not found] ` <20160427145632.GI17926-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-04-27 15:05 ` Michael S. Tsirkin
2016-04-27 15:15 ` David Woodhouse
2016-04-27 18:17 ` Michael S. Tsirkin
2016-04-27 19:16 ` David Woodhouse [this message]
[not found] ` <1461784617.118304.181.camel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-28 14:34 ` Michael S. Tsirkin
2016-04-28 15:11 ` David Woodhouse
[not found] ` <1461856314.33870.98.camel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-28 15:37 ` Michael S. Tsirkin
2016-04-28 15:48 ` David Woodhouse
2016-05-01 10:37 ` Michael S. Tsirkin
[not found] ` <20160428182341-mutt-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-09 11:09 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461784617.118304.181.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=amit.shah@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jasowang@redhat.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wei.liu2@citrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).