public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: avi@scylladb.com, avi@cloudius-systems.com, gleb@scylladb.com,
	corbet@lwn.net, bruce.richardson@intel.com, mst@redhat.com,
	linux-kernel@vger.kernel.org, alexander.duyck@gmail.com,
	gleb@cloudius-systems.com, vladz@cloudius-systems.com,
	iommu@lists.linux-foundation.org, hjk@hansjkoch.de,
	gregkh@linuxfoundation.org
Subject: Re: [RFC PATCH v2] vfio: Include No-IOMMU mode
Date: Thu, 15 Oct 2015 15:40:25 -0700	[thread overview]
Message-ID: <20151015154025.6c9a17cf@xeon-e3> (raw)
In-Reply-To: <20151014212933.22236.22913.stgit@gimli.home>

On Wed, 14 Oct 2015 15:51:18 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:

> There is really no way to safely give a user full access to a DMA
> capable device without an IOMMU to protect the host system.  There is
> also no way to provide DMA translation, for use cases such as device
> assignment to virtual machines.  However, there are still those users
> that want userspace drivers even under those conditions.  The UIO
> driver exists for this use case, but does not provide the degree of
> device access and programming that VFIO has.  In an effort to avoid
> code duplication, this introduces a No-IOMMU mode for VFIO.
> 
> This mode requires building VFIO with CONFIG_VFIO_NOIOMMU and enabling
> the "enable_unsafe_noiommu_mode" option on the vfio driver.  This
> should make it very clear that this mode is not safe.  Additionally,
> CAP_SYS_RAWIO privileges are necessary to work with groups and
> containers using this mode.  Groups making use of this support are
> named /dev/vfio/noiommu-$GROUP and can only make use of the special
> VFIO_NOIOMMU_IOMMU for the container.  Use of this mode, specifically
> binding a device without a native IOMMU group to a VFIO bus driver
> will taint the kernel and should therefore not be considered
> supported.  This patch includes no-iommu support for the vfio-pci bus
> driver only.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

The concept looks good.

I am trying it now to see how well this works for the use case of DPDK
in a VM.


      parent reply	other threads:[~2015-10-15 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 21:51 [RFC PATCH v2] vfio: Include No-IOMMU mode Alex Williamson
2015-10-15 16:44 ` Michael S. Tsirkin
2015-10-15 22:40 ` Stephen Hemminger [this message]

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=20151015154025.6c9a17cf@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=alex.williamson@redhat.com \
    --cc=alexander.duyck@gmail.com \
    --cc=avi@cloudius-systems.com \
    --cc=avi@scylladb.com \
    --cc=bruce.richardson@intel.com \
    --cc=corbet@lwn.net \
    --cc=gleb@cloudius-systems.com \
    --cc=gleb@scylladb.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hjk@hansjkoch.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=vladz@cloudius-systems.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