2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 02:34:01 +08:00
linux-next/drivers/vfio/pci
Alex Williamson 033291eccb vfio: Include No-IOMMU mode
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>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-04 09:56:16 -07:00
..
Kconfig vfio: Split virqfd into a separate module for vfio bus drivers 2015-03-17 08:33:38 -06:00
Makefile vfio: initialize the virqfd workqueue in VFIO generic code 2015-03-16 14:08:54 -06:00
vfio_pci_config.c vfio/pci: Use kernel VPD access functions 2015-10-27 14:53:05 -06:00
vfio_pci_intrs.c vfio: move eventfd support code for VFIO_PCI to a separate file 2015-03-16 14:08:54 -06:00
vfio_pci_private.h vfio: move eventfd support code for VFIO_PCI to a separate file 2015-03-16 14:08:54 -06:00
vfio_pci_rdwr.c vfio-pci: Add support for VGA region access 2013-02-18 10:11:13 -07:00
vfio_pci.c vfio: Include No-IOMMU mode 2015-11-04 09:56:16 -07:00