mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: Li Ming <ming.li@zohomail.com>
Cc: dave@stgolabs.net, jic23@kernel.org, dave.jiang@intel.com,
	 alison.schofield@intel.com, vishal.l.verma@intel.com,
	iweiny@kernel.org,  linux-cxl@vger.kernel.org,
	linux-kernel@vger.kernel.org, kaihengf@nvidia.com,
	 kobak@nvidia.com, newtonl@nvidia.com, kristinc@nvidia.com
Subject: Re: [PATCH] cxl/port: Unmask AER internal errors for VH endpoints
Date: Tue, 3 Nov 2026 15:17:41 +0800	[thread overview]
Message-ID: <aumKcxC28vRfs0rL@MWDK4CY14F> (raw)
In-Reply-To: <e362b604-58da-43c8-bc3c-904becf92035@zohomail.com>

On Sat, Oct 31, 2026 at 03:11:29AM +0800, Li Ming wrote:
> On 10/30/2026 5:59 PM, Richard Cheng wrote:
> > CXL protocol errors are reported through PCIe AER internal errors.
> > Unmasking the endpoint's CXL RAS register alone leaves the AER internal
> > errors masked, thus the notification can't reach the Root Port.
> >
> > Unmask AER internal errors during native endpoint RAS setup for VH
> > devices. Allow cxl_port to use pci_aer_unmask_internal_errors() through
> > its module-restricted export.
> >
> > Verified with QEMU mem-data-ecc injection: the Root Port AER interrupt
> > fires, the CXL correctable-error trace is emitted, and the endpoint's
> > CorrIntErr counter increments.
> 
> I found the similiar implementation[1] in CXL RAS support for VH patchset[2], seems like it is under review.
>

Ohh ok, then I think we can drop this one.

Thanks.
 
> 
> [1]: https://lore.kernel.org/linux-cxl/20260902133933.2992457-9-terry.bowman@amd.com/
> 
> [2]: https://lore.kernel.org/linux-cxl/20260902133933.2992457-1-terry.bowman@amd.com/
> 
> 
> Ming
> 
> >
> > Signed-off-by: Richard Cheng <icheng@nvidia.com>
> > ---
> >  drivers/cxl/port.c     | 7 +++++++
> >  drivers/pci/pcie/aer.c | 3 ++-
> >  2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c
> > index c48216e5078f..c94a310061b0 100644
> > --- a/drivers/cxl/port.c
> > +++ b/drivers/cxl/port.c
> > @@ -121,6 +121,13 @@ static int cxl_ras_unmask(struct cxl_port *port)
> >  			orig_val, val);
> >  	}
> >  
> > +	/*
> > +	 * RCH errors are reported by the RCEC. VH endpoints report CXL
> > +	 * protocol errors as PCIe AER internal errors.
> > +	 */
> > +	if (!is_cxl_restricted(pdev))
> > +		pci_aer_unmask_internal_errors(pdev);
> > +
> >  	return 0;
> >  }
> >  
> > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> > index db4f607f889c..94eca22422b7 100644
> > --- a/drivers/pci/pcie/aer.c
> > +++ b/drivers/pci/pcie/aer.c
> > @@ -1287,7 +1287,8 @@ void pci_aer_unmask_internal_errors(struct pci_dev *dev)
> >   * Internal errors are too device-specific to enable generally, however for CXL
> >   * their behavior is standardized for conveying CXL protocol errors.
> >   */
> > -EXPORT_SYMBOL_FOR_MODULES(pci_aer_unmask_internal_errors, "cxl_core");
> > +EXPORT_SYMBOL_FOR_MODULES(pci_aer_unmask_internal_errors,
> > +			  "cxl_core,cxl_port");
> >  
> >  #ifdef CONFIG_CXL_RAS
> >  bool is_aer_internal_error(struct aer_err_info *info)
> >
> > base-commit: f0c48323b0402349530abc60ea908b5f5f40c395
> 
> 

      reply	other threads:[~2026-11-03  7:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  9:59 Richard Cheng
2026-10-30 18:28 ` Bowman, Terry
2026-11-03  7:25   ` Richard Cheng
2026-10-30 19:11 ` Li Ming
2026-11-03  7:17   ` 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=aumKcxC28vRfs0rL@MWDK4CY14F \
    --to=icheng@nvidia.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=kaihengf@nvidia.com \
    --cc=kobak@nvidia.com \
    --cc=kristinc@nvidia.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=newtonl@nvidia.com \
    --cc=vishal.l.verma@intel.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®