[PATCH 2/2] powerpc/pseries/msi: Release RTAS MSI state on vector disable

From: Narayana Murty N

Date: Fri Dec 04 2026 - 11:43:33 EST


Before commit daaa574aba6f ("powerpc/pseries/msi: Switch to
msi_create_parent_irq_domain()"), pSeries released its RTAS MSI
configuration from the legacy msi_post_free() callback when the MSI
or MSI-X vectors were freed.

The conversion to hierarchical MSI domains moved that release into
msi_ops->msi_teardown(), which runs when the per-device MSI domain is
destroyed. The PCI/MSI core normally retains that domain across a
complete vector disable, so freeing the vectors no longer necessarily
calls rtas_disable_msi(). A later allocation can reuse the existing
domain and skip msi_ops->msi_prepare(), leaving the RTAS configuration
unchanged even when the device has been reset or reconfigured between
allocations.

Set MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN for pSeries. This causes the
device MSI domain to be destroyed after normal vector disable or a
terminal enable failure. Domain teardown releases the RTAS
configuration, and the next allocation creates a fresh domain and runs
RTAS preparation again. Internal retries with fewer vectors continue to
reuse the prepared domain.

Fixes: daaa574aba6f ("powerpc/pseries/msi: Switch to msi_create_parent_irq_domain()")
Signed-off-by: Narayana Murty N <nnmlinux@xxxxxxxxxxxxx>
---
arch/powerpc/platforms/pseries/msi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 8285b9a29fbf..6d5b1799c5b7 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -517,7 +517,8 @@ static bool pseries_init_dev_msi_info(struct device *dev, struct irq_domain *dom

#define PSERIES_PCI_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS | \
MSI_FLAG_USE_DEF_CHIP_OPS | \
- MSI_FLAG_PCI_MSI_MASK_PARENT)
+ MSI_FLAG_PCI_MSI_MASK_PARENT | \
+ MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN)
#define PSERIES_PCI_MSI_FLAGS_SUPPORTED (MSI_GENERIC_FLAGS_MASK | \
MSI_FLAG_PCI_MSIX | \
MSI_FLAG_MSIX_CONTIGUOUS | \
--
2.54.0