qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: qemu-devel@nongnu.org, linux-kernel@vger.kernel.org,
	pbonzini@redhat.com, peterx@redhat.com, cornelia.huck@de.ibm.com,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, Amit Shah <amit.shah@redhat.com>,
	qemu-block@nongnu.org, Jason Wang <jasowang@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Andy Lutomirski <luto@kernel.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Wei Liu <wei.liu2@citrix.com>,
	virtualization@lists.linux-foundation.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH RFC] fixup! virtio: convert to use DMA api
Date: Mon, 18 Apr 2016 16:12:01 +0300	[thread overview]
Message-ID: <20160418160731-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1460980717.12793.43.camel@infradead.org>

On Mon, Apr 18, 2016 at 07:58:37AM -0400, David Woodhouse wrote:
> On Mon, 2016-04-18 at 14:47 +0300, Michael S. Tsirkin wrote:
> > This adds a flag to enable/disable bypassing the IOMMU by
> > virtio devices.
> 
> I'm still deeply unhappy with having this kind of hack in the virtio
> code at all, as you know. Drivers should just use the DMA API and if
> the *platform* wants to make it a no-op for a specific device, then it
> can.
> 
> Remember, this isn't just virtio either. Don't we have *precisely* the
> same issue with assigned PCI devices on a system with an emulated Intel
> IOMMU? The assigned PCI devices aren't covered by the emulated IOMMU,
> and the platform needs to know to bypass *those* too.
> 
> Now, we've had this conversation, and we accepted the hack in virtio
> for now until the platforms (especially SPARC and Power IIRC) can get
> their act together and make their DMA API implementations not broken.
> 
> But now you're adding this hack to the public API where we have to
> support it for ever. Please, can't we avoid that?

I'm not sure I understand the issue.  The public API is not about how
the driver works.  It doesn't say "don't use DMA API" anywhere, does it?
It's about telling device whether to obey the IOMMU and
about discovering whether a device is in fact under the IOMMU.

Once DMA API allows bypassing IOMMU per device we'll be
able to drop the ugly hack from virtio drivers, simply keying it
off the given flag.


> -- 
> dwmw2
> 
> 

  reply	other threads:[~2016-04-18 13:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 11:47 [Qemu-devel] [PATCH RFC] fixup! virtio: convert to use DMA api Michael S. Tsirkin
2016-04-18 11:58 ` David Woodhouse
2016-04-18 13:12   ` Michael S. Tsirkin [this message]
2016-04-18 14:03     ` David Woodhouse
2016-04-18 14:23       ` Michael S. Tsirkin
2016-04-18 15:22         ` David Woodhouse
2016-04-18 15:30           ` Michael S. Tsirkin
2016-04-18 15:51             ` David Woodhouse
2016-04-18 16:27               ` Michael S. Tsirkin
2016-04-18 18:29                 ` David Woodhouse
2016-04-18 19:24                   ` Andy Lutomirski
2016-04-19 10:27                     ` Michael S. Tsirkin
2016-04-19 16:02                       ` Andy Lutomirski
2016-04-19 16:09                         ` Michael S. Tsirkin
2016-04-19 16:12                           ` Andy Lutomirski
2016-04-19 16:20                             ` Michael S. Tsirkin
2016-04-19 16:26                               ` David Woodhouse
2016-04-19 17:49                                 ` Michael S. Tsirkin
2016-04-19 18:01                                   ` Andy Lutomirski
2016-04-19 20:16                                     ` Michael S. Tsirkin
2016-04-19 20:27                                       ` Andy Lutomirski
2016-04-19 20:54                                         ` Michael S. Tsirkin
2016-04-19 21:07                                           ` Andy Lutomirski
2016-04-20 13:14                                             ` Michael S. Tsirkin
2016-04-20 15:43                                               ` Andy Lutomirski
2016-04-19  9:13                   ` Michael S. Tsirkin
2016-04-19 14:44                     ` Alex Williamson
2016-04-19 16:00                     ` Andy Lutomirski
2016-04-19 16:04                       ` Michael S. Tsirkin

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=20160418160731-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dwmw2@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).