PCI/CXL: Guard device accesses during reset recovery
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 4 repliesIn review
- v22 patches 3 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | PCI/MSI: Skip MSI/MSI-X restoration when config space is inaccessibledrivers/ drivers/ drivers/ | +8 | 4 replies | |
| 2/2 | cxl/pci: Guard decoder accesses after resetdrivers/ | +6 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Dave Jiang |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] PCI/CXL: Guard device accesses during reset recovery
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/[email protected]/
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
Signature · 1 line
2.43.0