mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: bhelgaas@google.com, dave@stgolabs.net, jic23@kernel.org,
	 dave.jiang@intel.com, alison.schofield@intel.com,
	vishal.l.verma@intel.com,  benjamin.cheatham@amd.com
Cc: iweiny@kernel.org, ming.li@zohomail.com,
	linux-cxl@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, tglx@kernel.org,
	 wangruikang@iscas.ac.cn, vidyas@nvidia.com,
	lihaoxiang@isrc.iscas.ac.cn,  xiangzao@linux.alibaba.com,
	shawn.lin@rock-chips.com, alifm@linux.ibm.com,
	 18255117159@163.com
Subject: Re: [PATCH v2 0/2] PCI/CXL: Guard MMIO accesses during reset recovery
Date: Fri, 6 Nov 2026 19:22:25 +0800	[thread overview]
Message-ID: <au24TndoXU-5gSo7@MWDK4CY14F> (raw)
In-Reply-To: <20261106111829.55823-1-icheng@nvidia.com>

On Fri, Nov 06, 2026 at 07:18:27PM +0800, Richard Cheng wrote:
> 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.
> 
>

Sorry forgot to attach the link for v1:

https://lore.kernel.org/all/20260929020405.9724-1-icheng@nvidia.com/

Best regards,
Richard Cheng.
 
> 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
> 

      parent reply	other threads:[~2026-11-06 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Richard Cheng [this message]

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=au24TndoXU-5gSo7@MWDK4CY14F \
    --to=icheng@nvidia.com \
    --cc=18255117159@163.com \
    --cc=alifm@linux.ibm.com \
    --cc=alison.schofield@intel.com \
    --cc=benjamin.cheatham@amd.com \
    --cc=bhelgaas@google.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --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=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®