[PATCH v3 0/2] PCI/CXL: Guard device accesses during reset recovery
From: Richard Cheng
Date: Mon Nov 16 2026 - 01:52:49 EST
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@xxxxxxxxxx/
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