All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table
@ 2017-06-30  5:24 Alexey Kardashevskiy
  2017-06-30  5:24 ` [PATCH kernel v4 1/6] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag Alexey Kardashevskiy
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Alexey Kardashevskiy @ 2017-06-30  5:24 UTC (permalink / raw)
  To: kvm
  Cc: Alexey Kardashevskiy, David Gibson, Alex Williamson,
	Bjorn Helgaas, Yongji Xie, Eric Auger


Here is a patchset which Yongji was working on before
leaving IBM LTC. Since we still want to have this functionality
in the kernel (DPDK is the first user), here is a rebase
on the current upstream.


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
3c2bfbaadff6 Linus Torvalds "Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm".

Please comment. Thanks.

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


Alexey Kardashevskiy (1):
  PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ
    remapping

Yongji Xie (5):
  PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag
  PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ
    remapping
  iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization
  pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge
  vfio-pci: Allow to expose MSI-X table to userspace if interrupt
    remapping is enabled

 include/linux/pci.h                       |  1 +
 arch/powerpc/platforms/powernv/pci-ioda.c |  7 +++++++
 drivers/iommu/iommu.c                     |  8 ++++++++
 drivers/pci/probe.c                       |  8 ++++++++
 drivers/vfio/pci/vfio_pci.c               | 17 ++++++++++++++---
 drivers/vfio/pci/vfio_pci_rdwr.c          |  3 ++-
 6 files changed, 40 insertions(+), 4 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2017-07-26 11:35 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  5:24 [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table Alexey Kardashevskiy
2017-06-30  5:24 ` [PATCH kernel v4 1/6] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag Alexey Kardashevskiy
2017-07-10 19:20   ` Bjorn Helgaas
2017-07-11  8:36     ` Alexey Kardashevskiy
2017-06-30  5:24 ` [PATCH kernel v4 2/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ remapping Alexey Kardashevskiy
2017-06-30  5:24 ` [PATCH kernel v4 3/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of " Alexey Kardashevskiy
2017-07-01 10:27   ` kbuild test robot
2017-06-30  5:24 ` [PATCH kernel v4 4/6] iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization Alexey Kardashevskiy
     [not found]   ` <20170630052436.15212-5-aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
2017-07-10 19:23     ` Bjorn Helgaas via iommu
2017-07-10 19:23       ` Bjorn Helgaas via iommu
     [not found]       ` <CAErSpo4pAZfDx5p_S9Z8jR_ctH=ZrkgG6aNaNmPaN2H77dgEgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-11 10:39         ` Robin Murphy
2017-07-11 10:39           ` Robin Murphy
2017-07-12  2:47           ` Alexey Kardashevskiy
2017-07-19  5:12           ` Benjamin Herrenschmidt
2017-07-19 10:02       ` Alexey Kardashevskiy
2017-07-25  6:09         ` Alexey Kardashevskiy
2017-07-26  9:50         ` Joerg Roedel
2017-07-26  9:50           ` Joerg Roedel
2017-07-26  9:50           ` Joerg Roedel
2017-07-26 11:33           ` Benjamin Herrenschmidt
2017-07-26 11:33             ` Benjamin Herrenschmidt
2017-07-26 11:33             ` Benjamin Herrenschmidt
2017-07-12  7:04   ` Jike Song
2017-07-12  7:28     ` Alexey Kardashevskiy
2017-06-30  5:24 ` [PATCH kernel v4 5/6] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge Alexey Kardashevskiy
2017-06-30  5:24 ` [PATCH kernel v4 6/6] vfio-pci: Allow to expose MSI-X table to userspace if interrupt remapping is enabled Alexey Kardashevskiy
2017-07-10  2:20 ` [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table Alexey Kardashevskiy
2017-07-10 19:11 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.