Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI/MSI: Allow opt-in domain teardown for pSeries RTAS
@ 2026-12-04 16:41 Narayana Murty N
  2026-12-04 16:41 ` [PATCH 1/2] PCI/MSI: Allow opt-in teardown of per-device MSI domains Narayana Murty N
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Narayana Murty N @ 2026-12-04 16:41 UTC (permalink / raw)
  To: Madhavan Srinivasan, Bjorn Helgaas, Thomas Gleixner
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Ritesh Harjani, Shrikanth Hegde, Radu Rendec, sbhat, harshpb,
	gautam, Nam Cao, Nilay Shroff, Vivian Wang, Shawn Lin,
	Rafael J . Wysocki, Jonathan Cameron, Lorenzo Pieralisi,
	Farhan Ali, Haoxiang Li, Yuanhe Shu, Vidya Sagar, Hans Zhang,
	Miles Krause, Randy Dunlap, linuxppc-dev, linux-pci, linux-kernel

PCI per-device MSI domains normally remain in place after their
MSI/MSI-X vectors are freed. This allows a later allocation to reuse
the domain, but can leave firmware-managed MSI state out of sync with
the device when the vectors are disabled and re-enabled across a reset
or reconfiguration.

Commit daaa574aba6f ("powerpc/pseries/msi: Switch to
msi_create_parent_irq_domain()") moved pSeries RTAS MSI release from
the legacy msi_post_free() callback to the per-device domain's
msi_ops->msi_teardown() callback. Freeing the vectors does not normally
destroy that domain. Consequently, neither the firmware teardown nor a
subsequent msi_ops->msi_prepare() is guaranteed to run across complete
vector disable/re-enable cycles while the device remains present.

This series adds a PCI-specific, opt-in domain teardown policy and
enables it for pSeries. For providers that request it, the domain is
removed after normal MSI/MSI-X disable and on terminal allocation
failure, so subsequent allocation creates a new domain and re-runs
firmware preparation. The domain is retained during internal retry with
fewer vectors attempts. Providers that do not opt in retain the
existing behavior.

The issue was investigated while debugging missing MSI-X delivery,
NVMe timeouts and subsequent EEH recovery in a pSeries guest with
a physical NVMe device assigned through VFIO. With the series applied,
testing on Linux 7.4.0-rc5+ in QEMU/KVM pSeries using direct KVM MSI-X
completed NVMe initialization and an XFS filesystem mount. The QEMU
MSI-X shadow changes used during these tests were held in the test
configuration; the result should not be interpreted as an isolated
kernel-only A/B comparison.

The first patch provides the opt-in PCI/MSI infrastructure. The second
selects it for pSeries to match the RTAS resource lifetime to the MSI
vector lifetime.


Narayana Murty N (2):
  PCI/MSI: Allow opt-in teardown of per-device MSI domains
  powerpc/pseries/msi: Release RTAS MSI state on vector disable

 arch/powerpc/platforms/pseries/msi.c |  3 +-
 drivers/pci/msi/api.c                |  2 ++
 drivers/pci/msi/irqdomain.c          |  7 +++++
 drivers/pci/msi/msi.c                | 36 ++++++++++++++++-------
 drivers/pci/msi/msi.h                |  1 +
 include/linux/msi.h                  |  4 +++
 kernel/irq/msi.c                     | 43 ++++++++++++++++++++++++++--
 7 files changed, 82 insertions(+), 14 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-12-04 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 16:41 [PATCH 0/2] PCI/MSI: Allow opt-in domain teardown for pSeries RTAS Narayana Murty N
2026-12-04 16:41 ` [PATCH 1/2] PCI/MSI: Allow opt-in teardown of per-device MSI domains Narayana Murty N
2026-12-04 17:01   ` sashiko-bot
2026-12-04 16:41 ` [PATCH 2/2] powerpc/pseries/msi: Release RTAS MSI state on vector disable Narayana Murty N
2026-12-04 17:11 ` [PATCH 0/2] PCI/MSI: Allow opt-in domain teardown for pSeries RTAS sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox