iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v6 00/20] VFIO support for platform devices on ARM
@ 2014-06-05 17:03 Antonios Motakis
  2014-06-05 17:03 ` [RFC PATCH v6 12/20] vfio/platform: support MMAP of MMIO regions Antonios Motakis
       [not found] ` <1401987808-23596-1-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
  0 siblings, 2 replies; 55+ messages in thread
From: Antonios Motakis @ 2014-06-05 17:03 UTC (permalink / raw)
  To: alex.williamson, kvmarm, iommu
  Cc: tech, a.rigo, kvm, christoffer.dall, will.deacon, kim.phillips,
	stuart.yoder, eric.auger, Antonios Motakis

This patch series aims to implement VFIO support for platform devices that
reside behind an IOMMU. Examples of such devices are devices behind an ARM
SMMU, or behind a Samsung Exynos System MMU.

The effort on VFIO_PLATFORM has been partially conducted under the SAVE FP7
project.
http://www.virtualopensystems.com/en/research/innovation-projects/fp7-save/

This version of the VFIO_PLATFORM patch series includes a number of fixes, and
introduces more complete support for eventfds. An eventfd can now be set by the
user, that can be used to mask and unmask a given interrupt.

The API used is based on the existing VFIO API that is also used with PCI
devices. Only devices that include a basic set of IRQs and memory regions are
targeted; devices with complex relationships with other devices on a device
tree are not taken into account at this stage.

Using the VFIO_IOMMU_TYPE1 driver with the VFIO_PLATFORM driver introduced here,
the standard VFIO ioctls have been found to be working on FastModels with an
ARM SMMU (MMU400). Testing was based on the ARM PL330 DMA Controller featured
on those models. Reading/writing to and MMAPing device memory regions is also
supported via the device file descriptor.

Kim Phillip's driver_override patch for platform bus devices is included in the
patch series.

A copy with all the dependencies applied can be cloned from branch
vfio-platform-v6 at git@github.com:virtualopensystems/linux-kvm-arm.git

For those who want to apply manually, these patches are based on Linux version
3.15-rc8.

Changes since v5:
 - Full eventfd support for IRQ masking and unmasking.
 - Changed IOMMU_EXEC to IOMMU_NOEXEC, along with related flags in VFIO.
 - Other fixes based on reviewer comments.
Changes since v4:
 - Use static offsets for each region in the VFIO device fd
 - Include patch in the series for the ARM SMMU to expose IOMMU_EXEC
   availability via IOMMU_CAP_DMA_EXEC
 - Rebased on VFIO multi domain support:
   - IOMMU_EXEC is now available if at least one IOMMU in the container
     supports it
   - Expose IOMMU_EXEC if available via the capability VFIO_IOMMU_PROT_EXEC
 - Some bug fixes
Changes since v3:
 - Use Kim Phillips' driver_probe_device()
Changes since v2:
 - Fixed Read/Write and MMAP on device regions
 - Removed dependency on Device Tree
 - Interrupts support
 - Interrupt masking/unmasking
 - Automask level sensitive interrupts
 - Introduced VFIO_DMA_MAP_FLAG_EXEC
 - Code clean ups


Antonios Motakis (19):
  iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC
  iommu: add capability IOMMU_CAP_NOEXEC
  iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver
  iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP
  vfio/iommu_type1: support for platform bus devices on ARM
  vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag
  vfio/iommu_type1: implement the VFIO_DMA_MAP_FLAG_NOEXEC flag
  vfio/platform: initial skeleton of VFIO support for platform devices
  vfio/platform: return info for device and its memory mapped IO regions
  vfio/platform: read and write support for the device fd
  vfio/platform: support MMAP of MMIO regions
  vfio/platform: return IRQ info
  vfio/platform: initial interrupts support
  vfio/platform: support for maskable and automasked interrupts
  vfio: move eventfd support code for VFIO_PCI to a sepparate file
  vfio: add local lock in virqfd instead of depending on VFIO PCI
  vfio: pass an opaque pointer on virqfd initialization
  vfio: initialize the virqfd workqueue in VFIO generic code
  vfio/platform: implement IRQ masking/unmasking via an eventfd

Kim Phillips (1):
  driver core: platform: add device binding path 'driver_override'

 Documentation/ABI/testing/sysfs-bus-platform  |  20 ++
 drivers/base/platform.c                       |  47 +++
 drivers/iommu/arm-smmu.c                      |   4 +-
 drivers/vfio/Kconfig                          |   3 +-
 drivers/vfio/Makefile                         |   3 +-
 drivers/vfio/pci/vfio_pci.c                   |   8 -
 drivers/vfio/pci/vfio_pci_intrs.c             | 234 +-------------
 drivers/vfio/pci/vfio_pci_private.h           |   3 -
 drivers/vfio/platform/Kconfig                 |   9 +
 drivers/vfio/platform/Makefile                |   4 +
 drivers/vfio/platform/vfio_platform.c         | 445 ++++++++++++++++++++++++++
 drivers/vfio/platform/vfio_platform_irq.c     | 343 ++++++++++++++++++++
 drivers/vfio/platform/vfio_platform_private.h |  62 ++++
 drivers/vfio/vfio.c                           |   8 +
 drivers/vfio/vfio_iommu_type1.c               |  30 +-
 drivers/vfio/virqfd.c                         | 213 ++++++++++++
 include/linux/iommu.h                         |   7 +-
 include/linux/platform_device.h               |   1 +
 include/linux/vfio.h                          |  26 ++
 include/uapi/linux/vfio.h                     |   3 +
 20 files changed, 1233 insertions(+), 240 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-platform
 create mode 100644 drivers/vfio/platform/Kconfig
 create mode 100644 drivers/vfio/platform/Makefile
 create mode 100644 drivers/vfio/platform/vfio_platform.c
 create mode 100644 drivers/vfio/platform/vfio_platform_irq.c
 create mode 100644 drivers/vfio/platform/vfio_platform_private.h
 create mode 100644 drivers/vfio/virqfd.c

-- 
1.8.3.2


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2014-09-11 17:20 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-05 17:03 [RFC PATCH v6 00/20] VFIO support for platform devices on ARM Antonios Motakis
2014-06-05 17:03 ` [RFC PATCH v6 12/20] vfio/platform: support MMAP of MMIO regions Antonios Motakis
     [not found] ` <1401987808-23596-1-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 17:03   ` [RFC PATCH v6 01/20] iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC Antonios Motakis
2014-06-16 15:04     ` Will Deacon
2014-06-05 17:03   ` [RFC PATCH v6 02/20] iommu: add capability IOMMU_CAP_NOEXEC Antonios Motakis
     [not found]     ` <1401987808-23596-3-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 20:03       ` Alex Williamson
     [not found]         ` <1401998627.9207.227.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-06-06 16:35           ` Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 03/20] iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver Antonios Motakis
     [not found]     ` <1401987808-23596-4-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-16 15:04       ` Will Deacon
     [not found]         ` <20140616150451.GP16758-5wv7dgnIgG8@public.gmane.org>
2014-06-16 15:25           ` Alex Williamson
     [not found]             ` <1402932328.3707.36.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-06-16 15:30               ` Will Deacon
2014-06-05 17:03   ` [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP Antonios Motakis
     [not found]     ` <1401987808-23596-5-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 18:31       ` Varun Sethi
2014-06-08 10:31       ` Christoffer Dall
2014-06-16 14:53         ` Joerg Roedel
     [not found]           ` <20140616145344.GD18986-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-06-16 15:13             ` Will Deacon
     [not found]               ` <20140616151329.GQ16758-5wv7dgnIgG8@public.gmane.org>
2014-06-16 15:21                 ` Joerg Roedel
     [not found]                   ` <20140616152157.GB31771-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-06-16 15:25                     ` Will Deacon
     [not found]                       ` <20140616152526.GR16758-5wv7dgnIgG8@public.gmane.org>
2014-06-16 15:38                         ` Joerg Roedel
2014-06-26 18:08                           ` Chalamarla, Tirumalesh
2014-06-26 18:15                             ` Chalamarla, Tirumalesh
2014-06-26 18:41                               ` Chalamarla, Tirumalesh
     [not found]                                 ` <b085e02e72dc424d9624c3e810951087-Rl8gF8DaO8QN+Mk3fGG+YBQPvRvOrrxkXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-26 19:00                                   ` Alex Williamson
2014-06-26 19:10                                     ` Chalamarla, Tirumalesh
     [not found]                                       ` <ec8dbbcb991e4d73b73f4b4f98342445-Rl8gF8DaO8QN+Mk3fGG+YBQPvRvOrrxkXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-26 19:36                                         ` Alex Williamson
     [not found]                                           ` <1403811384.31091.151.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-06-27  8:47                                             ` Will Deacon
2014-06-27 21:57                                               ` Chalamarla, Tirumalesh
     [not found]                                                 ` <2645e3a22f5e4ae9994c0ee8fa327cb4-Rl8gF8DaO8QN+Mk3fGG+YBQPvRvOrrxkXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-06-28  7:05                                                   ` Marc Zyngier
2014-06-16 15:30                     ` Alex Williamson
2014-06-05 17:03   ` [RFC PATCH v6 05/20] vfio/iommu_type1: support for platform bus devices on ARM Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 06/20] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 07/20] vfio/iommu_type1: implement " Antonios Motakis
     [not found]     ` <1401987808-23596-8-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 20:48       ` Alex Williamson
2014-06-05 17:03   ` [RFC PATCH v6 08/20] driver core: platform: add device binding path 'driver_override' Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 09/20] vfio/platform: initial skeleton of VFIO support for platform devices Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 10/20] vfio/platform: return info for device and its memory mapped IO regions Antonios Motakis
     [not found]     ` <1401987808-23596-11-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 21:14       ` Alex Williamson
     [not found]         ` <1402002841.9207.260.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-06-06 16:39           ` Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 11/20] vfio/platform: read and write support for the device fd Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 13/20] vfio/platform: return IRQ info Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 14/20] vfio/platform: initial interrupts support Antonios Motakis
     [not found]     ` <1401987808-23596-15-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-08 10:09       ` Christoffer Dall
2014-09-02 16:07         ` Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 15/20] vfio/platform: support for maskable and automasked interrupts Antonios Motakis
     [not found]     ` <1401987808-23596-16-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-08 10:17       ` Christoffer Dall
2014-09-02 16:06         ` Antonios Motakis
     [not found]           ` <CAG8rG2z02JPE+D-Bo1puuMPCR=wETciLaBgKT+i1XKQ55U-kYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-10 10:13             ` Christoffer Dall
2014-09-11 17:20               ` Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 16/20] vfio: move eventfd support code for VFIO_PCI to a sepparate file Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 17/20] vfio: add local lock in virqfd instead of depending on VFIO PCI Antonios Motakis
     [not found]     ` <1401987808-23596-18-git-send-email-a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org>
2014-06-05 22:19       ` Alex Williamson
     [not found]         ` <1402006750.9207.267.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-06-06 16:57           ` Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 18/20] vfio: pass an opaque pointer on virqfd initialization Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 19/20] vfio: initialize the virqfd workqueue in VFIO generic code Antonios Motakis
2014-06-05 17:03   ` [RFC PATCH v6 20/20] vfio/platform: implement IRQ masking/unmasking via an eventfd Antonios Motakis

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).