From: Richard Cheng <icheng@nvidia.com>
To: dave@stgolabs.net, jic23@kernel.org, dave.jiang@intel.com,
alison.schofield@intel.com, vishal.l.verma@intel.com,
helgaas@google.com
Cc: iweiny@kernel.org, ming.li@zohomail.com, icheng@nvidia.com,
linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, tglx@kernel.org,
wangruikang@iscas.ac.cn, alifm@linux.ibm.com,
shawn.lin@rock-chips.com, lihaoxiang@isrc.iscas.ac.cn,
18255117159@163.com, xiangzao@linux.alibaba.com,
vidyas@nvidia.com, kaihengf@nvidia.com, kobak@nvidia.com,
newtonl@nvidia.com, kristinc@nvidia.com
Subject: [PATCH v3 0/2] PCI/CXL: Guard device accesses during reset recovery
Date: Mon, 16 Nov 2026 14:52:27 +0800 [thread overview]
Message-ID: <20261116065229.38194-1-icheng@nvidia.com> (raw)
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
next reply other threads:[~2026-11-16 6:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 6:52 Richard Cheng [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116065229.38194-1-icheng@nvidia.com \
--to=icheng@nvidia.com \
--cc=18255117159@163.com \
--cc=alifm@linux.ibm.com \
--cc=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=helgaas@google.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=kaihengf@nvidia.com \
--cc=kobak@nvidia.com \
--cc=kristinc@nvidia.com \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=newtonl@nvidia.com \
--cc=shawn.lin@rock-chips.com \
--cc=tglx@kernel.org \
--cc=vidyas@nvidia.com \
--cc=vishal.l.verma@intel.com \
--cc=wangruikang@iscas.ac.cn \
--cc=xiangzao@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®