Skip to content

RFC msi support for platform devices

Vikas Gupta kvm lkml oe-kbuild-all 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 RFC Latest3 patches 3 repliesIn review
  2. v3 RFC2 patches 10 repliesSuperseded
  3. v2 RFC1 patch 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC3 patches8 repliesSuperseded

Changes in v4 from the cover letter

1) Removed the 'cap' for exporting MSI info to userspace and restored into vedor specific module.
2) Enable GENERIC_MSI_IRQ_DOMAIN in Kconfig.
3) Removed the vendor specific, Broadcom, 'msi' module and integrated the MSI relates ops into the 'reset' module for MSI support.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vfio/platform: add support for msidrivers/vfio/platform/Kconfig drivers/vfio/platform/vfio_platform_common.c drivers/vfio/platform/vfio_platform_irq.c +2 more+373 -291 reply
2/3vfio/platform: change cleanup orderdrivers/vfio/platform/vfio_platform_common.c+1 -11 reply
3/3vfio: platform: reset: add msi supportdrivers/vfio/platform/reset/vfio_platform_bcmflexrm.c+70 -21 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchEric Auger
1/3
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [RFC v4 0/3] msi support for platform devices

This RFC adds support for MSI for platform devices. MSI block is added as an ext irq along with the existing wired interrupt implementation. The patchset exports two caps for MSI and related data to configure MSI source device.

Changes from:
-------------
v3 to v4:
1) Removed the 'cap' for exporting MSI info to userspace and restored into vedor specific module.
2) Enable GENERIC_MSI_IRQ_DOMAIN in Kconfig.
3) Removed the vendor specific, Broadcom, 'msi' module and integrated the MSI relates ops into the 'reset' module for MSI support.

v2 to v3:
1) Restored the vendor specific module to get max number of MSIs supported and .count value initialized.
2) Comments from Eric addressed.

v1 to v2:
1) IRQ allocation has been implemented as below:
----------------------------
|IRQ-0|IRQ-1|....|IRQ-n|MSI|
----------------------------
MSI block has msi contexts and its implemneted as ext irq.

2) Removed vendor specific module for msi handling so previously patch2 and patch3 are not required.

3) MSI related data is exported to userspace using 'caps'.
Please note VFIO_IRQ_INFO_CAP_TYPE in include/uapi/linux/vfio.h implementation
is taken from the Eric`s patch
https://patchwork.kernel.org/project/kvm/patch/[email protected]/

v0 to v1:
i) Removed MSI device flag VFIO_DEVICE_FLAGS_MSI. ii) Add MSI(s) at the end of the irq list of platform IRQs. MSI(s) with first entry of MSI block has count and flag information.
IRQ list: Allocation for IRQs + MSIs are allocated as below
Example: if there are 'n' IRQs and 'k' MSIs
-------------------------------------------------------
|IRQ-0|IRQ-1|....|IRQ-n|MSI-0|MSI-1|MSI-2|......|MSI-k|
-------------------------------------------------------
MSI-0 will have count=k set and flags set accordingly.

Vikas Gupta (3):
vfio/platform: add support for msi
vfio/platform: change cleanup order
vfio: platform: reset: add msi support

 drivers/vfio/platform/Kconfig                 |   1 +
 .../platform/reset/vfio_platform_bcmflexrm.c  |  72 ++++-
 drivers/vfio/platform/vfio_platform_common.c  |  97 +++++--
 drivers/vfio/platform/vfio_platform_irq.c     | 253 ++++++++++++++++--
 drivers/vfio/platform/vfio_platform_private.h |  29 ++
 include/uapi/linux/vfio.h                     |  24 ++
 6 files changed, 444 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.1