mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] PCI/CXL: Guard device accesses during reset recovery
@ 2026-11-16  6:52 Richard Cheng
  2026-11-16  6:52 ` [PATCH v3 1/2] PCI/MSI: Skip MSI/MSI-X restoration when config space is inaccessible Richard Cheng
  2026-11-16  6:52 ` [PATCH v3 2/2] cxl/pci: Guard decoder accesses after reset Richard Cheng
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Cheng @ 2026-11-16  6:52 UTC (permalink / raw)
  To: dave, jic23, dave.jiang, alison.schofield, vishal.l.verma, helgaas
  Cc: iweiny, ming.li, icheng, linux-cxl, linux-kernel, linux-pci,
	tglx, wangruikang, alifm, shawn.lin, lihaoxiang, 18255117159,
	xiangzao, vidyas, kaihengf, kobak, newtonl, kristinc

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

This series adds checks before two such access paths: MSI/MSI-X
state restoration and CXL HDM decoder checking.

Patch 1 checks pci_dev_config_accessible() at the start of
__pci_restore_msi_state() and __pci_restore_msix_state(). If
configuration space is inaccessible, warn and return before touching
the device. The DPC containment was observed on the MSI-X table
writes, which are MMIO. MSI is programmed through configuration space
only, but restoring it on an inaccessible device is equally pointless,
so both are covered.

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.

version 2's lore link is at
https://lore.kernel.org/all/20260929020405.9724-1-icheng@nvidia.com/

Best regards,
Richard Cheng.

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

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


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.43.0


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

end of thread, other threads:[~2026-11-16  6:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16  6:52 [PATCH v3 0/2] PCI/CXL: Guard device accesses during reset recovery Richard Cheng
2026-11-16  6:52 ` [PATCH v3 1/2] PCI/MSI: Skip MSI/MSI-X restoration when config space is inaccessible Richard Cheng
2026-11-16  6:52 ` [PATCH v3 2/2] cxl/pci: Guard decoder accesses after reset 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®