mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Lukas Wunner <lukas@wunner.de>, Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Kuppuswamy Sathyanarayanan
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Oliver O'Halloran <oohall@gmail.com>, Len Brown <lenb@kernel.org>,
	linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/6] PCI/DPC: Decide DPC ownership with host_bridge->native_dpc
Date: Wed, 25 Nov 2026 11:22:58 -0500	[thread overview]
Message-ID: <20261125162258.GH2156781@yaz-khff2.amd.com> (raw)
In-Reply-To: <awbF3MrVWm98q95O@wunner.de>

On Wed, Nov 25, 2026 at 12:26:20PM +0100, Lukas Wunner wrote:
> On Tue, Nov 24, 2026 at 06:08:38PM -0600, Bjorn Helgaas wrote:
> > On Tue, Nov 24, 2026 at 10:16:31AM +0100, Lukas Wunner wrote:
> > > Actually... come to think of it, you had this question about whether
> > > ratelimiting knobs should be exposed at all if there is no AER-capable
> > > Root Port or RCEC.  I think this could be implemented simply by not
> > > allocating aer_info in pci_aer_init() and jumping directly to the
> > > "enable" label.  (Because I think we still want to continue enabling
> > > Error Messages in case the user or the platform sets the System Error
> > > bits in the Root Control register.)
> > > 
> > > That would implicitly hide all statistics and ratelimiting files
> > > and may be a cleaner approach to overcome sashiko's objection that
> > > Root Port statistics are exposed on AER-incapable Root Ports with
> > > patch [7/7] of my series.  It would also save a little bit of memory
> > > if we don't unnecessarily allocate aer_info.
> > > 
> > > Do you agree?  If so I can prepare a patch.
> > 
> > I folded in the fix above for now, but will be happy to replace with
> > the approach you propose.
> 
> Hm, I thought about this some more and realized that at least on x86,
> the kernel may receive PCI System Errors through pci_serr_error() in
> arch/86/kernel/nmi.c.
> 

Do modern systems still do this?

The nature of x86 is that the hardware still holds legacy/deprecated
features for the sake of backwards-compatibility. But they aren't
expected to be used in a modern context.

I have an old patch to that effect.
fdce765a1338 ("EDAC/amd64: Don't set up EDAC PCI control on Family 17h+")

Tony, what do you think?

> A quick web search finds numerous recent reports of messages such as:
> 
>   NMI: PCI system error (SERR) for reason a0 on CPU 0.
>   Dazed and confused, but trying to continue
> 
> It would be possible to add plumbing such that pci_serr_error()
> funnels such errors to the AER driver, which would search for the
> error-reporting device and emit more useful messages.  The NMI
> message causes a lot of head-scratching among users.
> 
> With such plumbing added, the ratelimiting knobs and statistics in sysfs
> would actually be useful despite lack of an AER-capable Root Port or RCEC,
> which suggests that hiding them may be the wrong thing to do.  So maybe
> we should leave it as it is for now?
> 
> The "reason" in the NMI message is sometimes a1 or b1 in reports found on
> the web.  It's unclear to me if the "reason" and "CPU" provide a clue
> where the error-reporting device is located.
> 
> Support for this type of NMI was added in 2011 by commit 1c7b74d46fed
> ("x86, NMI: Add NMI symbol constants and rename memory parity to
> PCI SERR").
> 

I don't think the reason and CPU give any explicit indicator for the
error-reporting device.

I expect there would need to be a platform-specific handler. Or do you
think a brute force search across all PCI devices would be okay?

There's also overlap with EDAC modules. I assume the EDAC PCI handling
was a solution before AER came about.

Maybe this is a tangent, should the PCI error handling be removed from
EDAC and folded into the PCI subsystem?

Thanks,
Yazen

  reply	other threads:[~2026-11-25 16:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 18:17 Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 1/6] PCI/DPC: Avoid access to non-existent AER capability Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 2/6] PCI/DPC: Reinstate support for AER-incapable ports Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 3/6] PCI/EDR: Build EDR whenever DPC is enabled on ACPI Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 4/6] PCI/portdrv: Don't require AER to bind DPC service Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 5/6] PCI/ACPI: Request DPC control only together with AER control Kuppuswamy Sathyanarayanan
2026-11-18 18:17 ` [PATCH v3 6/6] PCI/portdrv: Bind DPC service based on host_bridge->native_dpc Kuppuswamy Sathyanarayanan
2026-11-19  0:10 ` [PATCH v3 0/6] PCI/DPC: Decide DPC ownership with host_bridge->native_dpc Bjorn Helgaas
2026-11-19  9:28   ` Lukas Wunner
2026-11-20 18:18     ` Bjorn Helgaas
2026-11-24  9:04       ` Lukas Wunner
2026-11-24  9:16         ` Lukas Wunner
2026-11-25  0:08           ` Bjorn Helgaas
2026-11-25 11:26             ` Lukas Wunner
2026-11-25 16:22               ` Yazen Ghannam [this message]
2026-11-25 16:45                 ` Lukas Wunner

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=20261125162258.GH2156781@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mahesh@linux.ibm.com \
    --cc=oohall@gmail.com \
    --cc=rafael@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tony.luck@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®