[lkml]   [2017]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

This is a followup for "[PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table"

This time it is using "caps" in IOMMU groups. The main question is if PCI
bus flags or IOMMU domains are still better (and which one).

Here is some background:

Current vfio-pci implementation disallows to mmap the page
containing MSI-X table in case that users can write directly
to MSI-X table and generate an incorrect MSIs.

However, this will cause some performance issue when there
are some critical device registers in the same page as the
MSI-X table. We have to handle the mmio access to these
registers in QEMU emulation rather than in guest.

To solve this issue, this series allows to expose MSI-X table
to userspace when hardware enables the capability of interrupt
remapping which can ensure that a given PCI device can only
shoot the MSIs assigned for it. And we introduce a new bus_flags
PCI_BUS_FLAGS_MSI_REMAP to test this capability on PCI side
for different archs.

This is based on sha1
26c5cebfdb6c "Merge branch 'parisc-4.13-4' of git://"

Please comment. Thanks.


* redid the whole thing via so-called IOMMU group capabilities

* rebased on recent upstream
* got all 6 patches from v2 (v3 was missing some)

Alexey Kardashevskiy (5):
iommu: Add capabilities to a group
iommu: Set IOMMU_GROUP_CAP_ISOLATE_MSIX if MSI controller enables IRQ
iommu/intel/amd: Set IOMMU_GROUP_CAP_ISOLATE_MSIX if IRQ remapping is
vfio-pci: Allow to expose MSI-X table to userspace when safe

include/linux/iommu.h | 20 ++++++++++++++++++++
include/linux/vfio.h | 1 +
arch/powerpc/kernel/iommu.c | 1 +
drivers/iommu/amd_iommu.c | 3 +++
drivers/iommu/intel-iommu.c | 3 +++
drivers/iommu/iommu.c | 35 +++++++++++++++++++++++++++++++++++
drivers/vfio/pci/vfio_pci.c | 20 +++++++++++++++++---
drivers/vfio/pci/vfio_pci_rdwr.c | 5 ++++-
drivers/vfio/vfio.c | 15 +++++++++++++++
9 files changed, 99 insertions(+), 4 deletions(-)


 \ /
  Last update: 2017-08-07 09:34    [W:0.167 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site