From: sashiko-bot@kernel.org
To: "Soham Purkait" <soham.purkait@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error
Date: Thu, 03 Dec 2026 18:46:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-248414@kernel.org> (raw)
In-Reply-To: <20261203174452.1398280-5-soham.purkait@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] drm/xe/ras: xe_ras_init() gates ras_usp_aer_init() on
CONFIG_PCIEAER
- [Low] drm/xe/ras: xe_ras.c imports CXL symbol namespace for
pcie_aer_is_native()
- [Low] drm/xe/ras: ras_usp_aer_init() checks pcie_aer_is_native()
before aer_cap
--
commit 9d71dea00aef6410038d1540e828b794fda350ca
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error
This commit adds support for the firmware RAS configuration mailbox command
and uses it in ras_usp_aer_init() to downgrade the USP AER uncorrectable
internal error severity when the OS does not have native AER control.
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 9b04be3405ca7..d2141a2fc8262 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
[ ... ]
> static void ras_usp_aer_init(struct xe_device *xe)
> {
> struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> + enum xe_ras_config config;
> struct pci_dev *usp;
> u16 aer_cap;
> u32 status;
> + int ret;
>
> usp = xe_pci_get_usp_dev(pdev);
> if (!usp)
> return;
>
> + if (!pcie_aer_is_native(usp)) {
> + config = XE_RAS_CONFIG_USP_AER_UNCOR_INTERNAL_NONFATAL;
> +
> + ret = ras_config(xe, config, XE_RAS_CONFIG_ACTION_SET);
> + if (ret)
> + return;
> +
> + /* Read the configuration */
> + ras_config(xe, config, XE_RAS_CONFIG_ACTION_GET);
> + return;
> + }
[Severity: Medium]
Should xe_ras_init() drop the IS_ENABLED(CONFIG_PCIEAER) guard around
ras_usp_aer_init()?
xe_ras_init() still skips ras_usp_aer_init() when CONFIG_PCIEAER is disabled,
even though pcie_aer_is_native() provides a stub returning 0 in that
configuration and the firmware fallback does not need native AER. On a
CONFIG_PCIEAER=n kernel, the USP uncorrectable internal error stays fatal, so
a hardware error can trigger firmware-first fatal escalation via GHES and
panic the kernel in __ghes_panic().
> aer_cap = pci_find_ext_capability(usp, PCI_EXT_CAP_ID_ERR);
> if (!aer_cap) {
> dev_warn(&usp->dev, "AER capability unavailable\n");
> return;
> }
[Severity: Low]
Can checking pcie_aer_is_native(usp) before aer_cap hide a missing AER
capability?
pcie_aer_is_native() returns 0 whenever usp->aer_cap is 0, regardless of
host->native_aer. With the current order, a USP without an AER capability
takes the !pcie_aer_is_native() branch and sends XE_SYSCTRL_CMD_RAS_CONFIG
commands to firmware instead of warning, while the if (!aer_cap) guard below
is unreachable whenever pcie_aer_is_native(usp) succeeds.
[ ... ]
> @@ -535,6 +599,7 @@ static void ras_usp_aer_init(struct xe_device *xe)
> pci_save_state(usp);
> dev_dbg(&usp->dev, "Uncorrectable Internal Errors downgraded and unmasked\n");
> }
> +MODULE_IMPORT_NS("CXL");
[Severity: Low]
Is importing the CXL namespace into xe the right way to call
pcie_aer_is_native()?
pcie_aer_is_native() is exported in the CXL namespace, and every other
importer of that namespace is a CXL driver or test. Importing it here
couples xe to a CXL-private export boundary that PCI maintainers have already
tightened on adjacent helpers such as pci_aer_unmask_internal_errors(), and
the import is not mentioned in the commit message. If xe needs
pcie_aer_is_native(), it would be cleaner to promote the export to
EXPORT_SYMBOL_GPL() first with PCI maintainer agreement.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203174452.1398280-4-soham.purkait@intel.com?part=1
next prev parent reply other threads:[~2026-12-03 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 17:44 [PATCH 0/2] drm/xe/ras: Configure USP AER via system controller mailbox Soham Purkait
2026-12-03 17:44 ` [PATCH 1/2] drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error Soham Purkait
2026-12-03 18:46 ` sashiko-bot [this message]
2026-12-03 17:44 ` [PATCH 2/2] drm/xe/ras: Use RAS config command for USP AER downgrade in passthrough Soham Purkait
2026-12-03 18:10 ` ✗ CI.KUnit: failure for drm/xe/ras: Configure USP AER via system controller mailbox Patchwork
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=sashiko-outbox-248414@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=soham.purkait@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