linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] vfio/pci: Remove duplicate code and logic from VFIO PCI interrupt management
@ 2024-02-02  4:56 Reinette Chatre
  2024-02-02  4:56 ` [PATCH 01/17] vfio/pci: Use unsigned int instead of unsigned Reinette Chatre
                   ` (16 more replies)
  0 siblings, 17 replies; 38+ messages in thread
From: Reinette Chatre @ 2024-02-02  4:56 UTC (permalink / raw)
  To: jgg, yishaih, shameerali.kolothum.thodi, kevin.tian,
	alex.williamson
  Cc: kvm, dave.jiang, ashok.raj, reinette.chatre, linux-kernel,
	patches

Hi Everybody,

Duplicate VFIO PCI interrupt management code and logic can be found
in two areas:
1) the VFIO PCI core (vfio_pci_core.c) directly accesses the
   VFIO PCI interrupt lock and data to duplicate actions available
   via the VFIO PCI interrupt management code (vfio_pci_intrs.c), and
2) the INTx and MSI/MSI-X interrupt management code within
   vfio_pci_intrs.c have duplicate logic.

This series addresses (1) and (2) by first containing VFIO PCI interrupt
management within the VFIO PCI interrupt management code found in
vfio_pci_intrs.c and then refactoring the VFIO PCI interrupt management
code (vfio_pci_intrs.c) to share common logic between INTx, MSI, and
MSI-X interrupt management.

Bulk of the changes result in the same actions as before this series.
Two functional changes to highlight:
a) "vfio/pci: Consistently acquire mutex for interrupt management"
   changes vfio_pci_core_disable()->vfio_pci_set_irqs_ioctl() to be
   called with the igate mutex held.
b) "vfio/pci: Preserve per-interrupt contexts" changes MSI/MSI-x
   interrupt management to preserve per-interrupt contexts across interrupt
   allocate/free.

This work was inspired by (and inherits a few patches from) the IMS [1]
enabling work but this work is submitted (and expected to be considered)
independent from IMS.

Any feedback will be appreciated.

Reinette

[1] https://lore.kernel.org/lkml/cover.1696609476.git.reinette.chatre@intel.com/

Reinette Chatre (17):
  vfio/pci: Use unsigned int instead of unsigned
  vfio/pci: Remove duplicate check from
    vfio_pci_set_ctx_trigger_single() wrappers
  vfio/pci: Consistently acquire mutex for interrupt management
  vfio/pci: Remove duplicate interrupt management from core VFIO PCI
  vfio/pci: Limit eventfd signaling to interrupt management code
  vfio/pci: Remove interrupt index interpretation from wrappers
  vfio/pci: Preserve per-interrupt contexts
  vfio/pci: Extract MSI/MSI-X specific code from common flow
  vfio/pci: Converge similar code flows
  vfio/pci: Extract INTx specific code from vfio_intx_set_signal()
  vfio/pci: Perform MSI/MSI-X interrupt management via callbacks
  vfio/pci: Remove msi term from generic code
  vfio/pci: Remove vfio_intx_set_signal()
  vfio/pci: Add utility to trigger INTx eventfd knowing interrupt
    context
  vfio/pci: Let enable and disable of interrupt types use same signature
  vfio/pci: Move vfio_msi_disable() to be with other MSI/MSI-X
    management code
  vfio/pci: Remove duplicate interrupt management flow

 drivers/vfio/pci/vfio_pci_core.c  |  49 ++-
 drivers/vfio/pci/vfio_pci_intrs.c | 510 ++++++++++++++++++------------
 2 files changed, 318 insertions(+), 241 deletions(-)

base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3
-- 
2.34.1


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

end of thread, other threads:[~2024-02-14 19:37 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02  4:56 [PATCH 00/17] vfio/pci: Remove duplicate code and logic from VFIO PCI interrupt management Reinette Chatre
2024-02-02  4:56 ` [PATCH 01/17] vfio/pci: Use unsigned int instead of unsigned Reinette Chatre
2024-02-02  4:56 ` [PATCH 02/17] vfio/pci: Remove duplicate check from vfio_pci_set_ctx_trigger_single() wrappers Reinette Chatre
2024-02-02  4:56 ` [PATCH 03/17] vfio/pci: Consistently acquire mutex for interrupt management Reinette Chatre
2024-02-05 22:34   ` Alex Williamson
2024-02-06 21:44     ` Reinette Chatre
2024-02-02  4:56 ` [PATCH 04/17] vfio/pci: Remove duplicate interrupt management from core VFIO PCI Reinette Chatre
2024-02-02  4:56 ` [PATCH 05/17] vfio/pci: Limit eventfd signaling to interrupt management code Reinette Chatre
2024-02-02  4:57 ` [PATCH 06/17] vfio/pci: Remove interrupt index interpretation from wrappers Reinette Chatre
2024-02-05 22:35   ` Alex Williamson
2024-02-06 21:44     ` Reinette Chatre
2024-02-02  4:57 ` [PATCH 07/17] vfio/pci: Preserve per-interrupt contexts Reinette Chatre
2024-02-05 22:35   ` Alex Williamson
2024-02-06 21:45     ` Reinette Chatre
2024-02-06 22:03       ` Alex Williamson
2024-02-06 22:21         ` Reinette Chatre
2024-02-02  4:57 ` [PATCH 08/17] vfio/pci: Extract MSI/MSI-X specific code from common flow Reinette Chatre
2024-02-02  4:57 ` [PATCH 09/17] vfio/pci: Converge similar code flows Reinette Chatre
2024-02-02  4:57 ` [PATCH 10/17] vfio/pci: Extract INTx specific code from vfio_intx_set_signal() Reinette Chatre
2024-02-02  4:57 ` [PATCH 11/17] vfio/pci: Perform MSI/MSI-X interrupt management via callbacks Reinette Chatre
2024-02-02  4:57 ` [PATCH 12/17] vfio/pci: Remove msi term from generic code Reinette Chatre
2024-02-05 22:35   ` Alex Williamson
2024-02-06 21:45     ` Reinette Chatre
2024-02-02  4:57 ` [PATCH 13/17] vfio/pci: Remove vfio_intx_set_signal() Reinette Chatre
2024-02-02  4:57 ` [PATCH 14/17] vfio/pci: Add utility to trigger INTx eventfd knowing interrupt context Reinette Chatre
2024-02-02  4:57 ` [PATCH 15/17] vfio/pci: Let enable and disable of interrupt types use same signature Reinette Chatre
2024-02-05 22:35   ` Alex Williamson
2024-02-06 21:46     ` Reinette Chatre
2024-02-06 22:03       ` Alex Williamson
2024-02-06 22:22         ` Reinette Chatre
2024-02-06 23:19           ` Alex Williamson
2024-02-07 23:30             ` Reinette Chatre
2024-02-08 21:08               ` Alex Williamson
2024-02-14 19:37                 ` Reinette Chatre
2024-02-02  4:57 ` [PATCH 16/17] vfio/pci: Move vfio_msi_disable() to be with other MSI/MSI-X management code Reinette Chatre
2024-02-02  4:57 ` [PATCH 17/17] vfio/pci: Remove duplicate interrupt management flow Reinette Chatre
2024-02-05 22:35   ` Alex Williamson
2024-02-06 21:46     ` Reinette Chatre

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