mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PCI/CXL: Guard MMIO accesses during reset recovery
@ 2026-11-06 11:18 Richard Cheng
  2026-11-06 11:18 ` [PATCH v2 1/2] PCI/MSI: Skip MSI-X restoration when configuration is inaccessible Richard Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Richard Cheng @ 2026-11-06 11:18 UTC (permalink / raw)
  To: bhelgaas, dave, jic23, dave.jiang, alison.schofield,
	vishal.l.verma, benjamin.cheatham
  Cc: iweiny, ming.li, icheng, linux-cxl, linux-kernel, linux-pci,
	tglx, wangruikang, vidyas, lihaoxiang, xiangzao, shawn.lin,
	alifm, 18255117159

PCI reset recovery may proceed with state restoration and driver
reset_done() callbacks even when a device has not recovered.
Accessing device MMIO in that state can cause additional errors, including
DPC containment.

This series adds checks before two MMIO access paths: MSI-X table
resoration and CXL HDM decoder checking.

Patch 1 checks the existing PCI Command register read in
__pci_restore_msix_state(). If the read fails or returns all ones,
warn and return before accessing the MSI-X table.

Patch 2 guards CXL decoder accesses after reset.
The CXL reset_done() callback independently accesses HDM decoder
MMIO to check whether decoder state was lost during reset.

Changes since v1 [1]:
- Dropped v1 patch 1, since commit e8df1d194c39
  ("PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV")
  already addresses the issue.
- Dropped v1 patch 2, following Benjamin Cheatham's review.
  That some devices rely on the existing fallback behavior.
- Reworked v1 patch 3 into v2 patch 1. Instead of skipping all PCI
  state restoration, check config accessibility before MSI-X restoration.
  This reduces the impact on other restoration paths.
- Retained v1 patch 4 as v2 patch 2.


Richard Cheng (2):
  PCI/MSI: Skip MSI-X restoration when configuration is inaccessible
  cxl/pci: Guard decoder accesses after reset

 drivers/cxl/pci.c     | 6 ++++++
 drivers/pci/msi/msi.c | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)


base-commit: f66469d9905b39d2c260a15d7d6db450f4db67c1
-- 
2.43.0


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

end of thread, other threads:[~2026-11-06 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 11:18 [PATCH v2 0/2] PCI/CXL: Guard MMIO accesses during reset recovery Richard Cheng
2026-11-06 11:18 ` [PATCH v2 1/2] PCI/MSI: Skip MSI-X restoration when configuration is inaccessible Richard Cheng
2026-11-06 18:30   ` Farhan Ali
2026-11-06 11:18 ` [PATCH v2 2/2] cxl/pci: Guard decoder accesses after reset Richard Cheng
2026-11-06 11:22 ` [PATCH v2 0/2] PCI/CXL: Guard MMIO accesses during reset recovery Richard Cheng

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

all inboxes | Powered by JetHome®