From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Jason Wang <jasowang@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Wei Liu <wei.liu2@citrix.com>,
David Woodhouse <dwmw2@infradead.org>,
virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org,
kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH RFC 0/3] virtio-pci: iommu support
Date: Mon, 18 Apr 2016 12:58:08 +0300 [thread overview]
Message-ID: <1460973374-32719-1-git-send-email-mst@redhat.com> (raw)
This is an attempt to allow enabling IOMMU for DMA.
Design:
- new feature bit IOMMU_PLATFORM which means
host won't bypass IOMMU
- virtio core uses DMA API if it sees IOMMU_PLATFORM
- add quirk for vfio to disable device unless IOMMU_PLATFORM is set
or the no-iommu mode is enabled
- while I'm not sure how it will be used, it seems like a good idea to
also have ability to distinguish between a legacy device and one
where iommu is bypassed intentionally. To this end, add another feature bit
IOMMU_PASSTHROUGH. We don't acknowledge it if IOMMU_PLATFORM is set.
TODO:
- I'm not sure whether there are setups that mix IOMMU
and no-IOMMU configs. If so, failing on probe might not
be the right thing to do, should fail binding to IOMMU group instead.
Michael S. Tsirkin (3):
virtio: add features for IOMMU control
vfio: report group noiommu status
vfio: add virtio pci quirk
drivers/vfio/pci/vfio_pci_private.h | 1 +
include/uapi/linux/virtio_config.h | 10 +-
drivers/vfio/pci/vfio_pci.c | 13 ++-
drivers/vfio/pci/vfio_pci_virtio.c | 142 +++++++++++++++++++++++++++
drivers/vfio/platform/vfio_platform_common.c | 2 +-
drivers/vfio/vfio.c | 5 +-
drivers/virtio/virtio_ring.c | 18 +++-
Documentation/vfio.txt | 4 +-
drivers/vfio/pci/Makefile | 1 +
9 files changed, 190 insertions(+), 6 deletions(-)
create mode 100644 drivers/vfio/pci/vfio_pci_virtio.c
--
MST
next reply other threads:[~2016-04-18 9:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 9:58 Michael S. Tsirkin [this message]
2016-04-18 9:58 ` [Qemu-devel] [PATCH RFC 1/3] virtio: add features for IOMMU control Michael S. Tsirkin
2016-04-18 9:58 ` [Qemu-devel] [PATCH RFC 2/3] vfio: report group noiommu status Michael S. Tsirkin
2016-04-18 18:56 ` Alex Williamson
2016-04-18 9:58 ` [Qemu-devel] [PATCH RFC 3/3] vfio: add virtio pci quirk Michael S. Tsirkin
2016-04-18 20:00 ` Alex Williamson
2016-04-19 9:58 ` 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=1460973374-32719-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@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=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=qemu-devel@nongnu.org \
--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).