From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [RFC] virtio: convert to use DMA api
Date: Mon, 23 Nov 2015 10:36:45 +0100 [thread overview]
Message-ID: <20151123103645.4c899f97.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1448264471-25066-1-git-send-email-jasowang@redhat.com>
On Mon, 23 Nov 2015 15:41:11 +0800
Jason Wang <jasowang@redhat.com> wrote:
> Currently, all virtio devices bypass IOMMU completely. This is because
> address_space_memory is assumed and used during DMA emulation. This
> patch converts the virtio core API to use DMA API. This idea is
>
> - introducing a new transport specific helper to query the dma address
> space. (only pci version is implemented).
> - query and use this address space during virtio device guest memory
> accessing
>
> With this virtiodevices will not bypass IOMMU anymore. Little tested with
> intel_iommu=on with virtio guest DMA series posted in
> https://lkml.org/lkml/2015/10/28/64.
>
> TODO:
> - Feature bit for this
I'm still not convinced about that feature bit stuff. It just feels
wrong to use a mechanism that conveys negotiable device features to
configure what is basically a platform/hypervisor feature. I'd rather
see this out of the virtio layer and into the pci layer.
> - Implement this for all transports
Is it OK to just keep a fallback to today's implementation for
transports for which the iommu concept doesn't make sense and that will
always have an identity mapping?
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> hw/block/virtio-blk.c | 2 +-
> hw/char/virtio-serial-bus.c | 2 +-
> hw/scsi/virtio-scsi.c | 2 +-
> hw/virtio/virtio-pci.c | 9 +++++++++
> hw/virtio/virtio.c | 36 +++++++++++++++++++--------------
> include/hw/virtio/virtio-access.h | 42 +++++++++++++++++++++++++++++----------
> include/hw/virtio/virtio-bus.h | 1 +
> include/hw/virtio/virtio.h | 2 +-
> 8 files changed, 67 insertions(+), 29 deletions(-)
FWIW, this doesn't seem to break for the s390-ccw-virtio machine (only
snifftested).
next prev parent reply other threads:[~2015-11-23 9:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 7:41 [Qemu-devel] [RFC] virtio: convert to use DMA api Jason Wang
2015-11-23 8:06 ` Michael S. Tsirkin
2015-11-24 5:38 ` Jason Wang
2015-11-23 9:36 ` Cornelia Huck [this message]
2015-11-23 9:52 ` Michael S. Tsirkin
2015-11-23 14:34 ` Cornelia Huck
2015-11-23 14:39 ` Peter Maydell
2015-11-24 5:42 ` Jason Wang
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=20151123103645.4c899f97.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).