From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08785606A33F for ; Thu, 3 Dec 2026 18:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NHuYfRFO Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C1DB510EA70; Thu, 3 Dec 2026 18:46:18 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8D0710EB38 for ; Thu, 3 Dec 2026 18:46:12 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 26ADE61E39; Thu, 3 Dec 2026 18:46:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C02EB1F00899; Thu, 3 Dec 2026 18:46:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796323571; bh=QRGGiZqD2TWNQ/lsevD8vsdDcYKjFRb+yLGg7gaQmY4=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=NHuYfRFOGUOcKg+Q5KVnbBTiJlIilj9upDc609UzKm68K9nR7c7uRfk2oosdx1eaf vrhtczmXZ4zj4dH8LbRs22i9ALY3RrGqr98JXGRkH3GTmnO76LNqALpmnGEyzSSFBm agmLGVY0t9oZ2oiUQjaTDN9eN7DQWksOYp1zqUBOVPln11Amxz3Cb+usOidv9mbZUv dRndilsuEhNCHEpS3R+eHzDIzXzl0LjW75UWVsUf6MnsRElX4sXY4SuG6YczE6pLFk t1/kvrv0JtDKcd9kv2vPugIZ0beeR16FRKPHbmasUTOHxvi2ceSkIia0Pv61UQjLNu Lf8MzMKqwcASw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/2] drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error To: "Soham Purkait" , intel-xe@lists.freedesktop.org In-Reply-To: <20261203174452.1398280-5-soham.purkait@intel.com> References: <20261203174452.1398280-4-soham.purkait@intel.com> <20261203174452.1398280-5-soham.purkait@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 18:46:11 +0000 X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "Intel-xe" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 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 =3D to_pci_dev(xe->drm.dev); > + enum xe_ras_config config; > struct pci_dev *usp; > u16 aer_cap; > u32 status; > + int ret; > =20 > usp =3D xe_pci_get_usp_dev(pdev); > if (!usp) > return; > =20 > + if (!pcie_aer_is_native(usp)) { > + config =3D XE_RAS_CONFIG_USP_AER_UNCOR_INTERNAL_NONFATAL; > + > + ret =3D 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 disable= d, 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=3Dn 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 =3D 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 unmask= ed\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 alrea= dy 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. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203174452.1398= 280-4-soham.purkait@intel.com?part=3D1