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 BF0F3606A325 for ; Tue, 1 Dec 2026 10:06:34 +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=NYarmUQv Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8258810F73E; Tue, 1 Dec 2026 10:06:29 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D0C510F703 for ; Tue, 1 Dec 2026 10:06:23 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3B036452DC; Tue, 1 Dec 2026 10:06:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 061891F00893; Tue, 1 Dec 2026 10:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796119583; bh=ovArwJJLvQ5ajXGXVjMCCIDHeQqm/DISgWQJpIRjKj4=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=NYarmUQvghwMjqCV8dj0esnT+A8jkxNjC6CrRym48nS5kkmO7O86d2Df+sDCkl+uI XuBsKj6n+PKU/g0uUy/altYg3dfckm47kfpGdEiOs9JJrmYm0jwKa8MF1/hBfaYiZU HOZ20chw1XOO7Uhg7GWhGa2LHOBd87H0DFY/bpqsBIKNSAHmwS0SXkqZsgsiKZxBld 4p4DRZ2hX2vTQGp6cP8NEcpuRSISpzHq/fQ/oU8dCO+ac6i5Xb8h+wFK/KD9hgMQCp WUpWsKJqKAd0px5E+E1BroNp1E1dfjP/6TFVa3RGxHk7Hq/L2wXZQ/o7JJykqRg5FA c+6piSKsyZNFQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 1/4] drm/xe/ras: Fail probe if the device is wedged To: "Riana Tauro" , intel-xe@lists.freedesktop.org In-Reply-To: <20261201094549.3158286-7-riana.tauro@intel.com> References: <20261201094549.3158286-6-riana.tauro@intel.com> <20261201094549.3158286-7-riana.tauro@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 10:06:21 +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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,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 2 potential issues to consider: - [High] drm/xe/ras: failing probe in xe_ras_init() breaks wedge and survivability - [Low] drm/xe/ras: contradictory comment in xe_ras_init() and Fixes tag mismatch -- commit 030e0d12085cebf24ab059575d2d8f08044502e7 Author: Riana Tauro > drm/xe/ras: Fail probe if the device is wedged > > RAS error processing during probe may wedge the device when errors like > Punit, CSC and Memory errors are reported. > Stop initialization and fail probe for such errors. > > Fixes: 573f9e7ed1a9 ("drm/xe/xe_ras: Handle uncorrectable SoC Internal er= rors") > Signed-off-by: Riana Tauro [Severity: Low] Should the Fixes: tag point to 84474fbf9ae5 ("drm/xe/ras: Move xe_ras_process_errors() to xe_ras") instead? 20bc4883c7c0 ("drm/xe/ras: Fix boot-time ras error processing") had moved boot-time error processing to the end of xe_device_probe(), and 84474fbf9ae5 ("drm/xe/ras: Move xe_ras_process_errors() to xe_ras") moved xe_ras_process_errors() back into xe_ras_init() in the middle of probe. Also, the comment right above xe_ras_process_errors() in xe_ras_init() still says that critical errors such as Punit and CSC are reported through Pcode init failure rather than here, which contradicts the commit message and the new comment below it: drivers/gpu/drm/xe/xe_ras.c:xe_ras_init() { ... /* * During probe, process and log any errors detected by firmware while the= driver was not * loaded. Critical errors such as Punit and CSC are reported through Pcod= e init failure, * causing the driver to enter survivability mode. */ xe_ras_process_errors(xe); ... } > diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c > index 9b04be3405ca7..666b06b4bc008 100644 > --- a/drivers/gpu/drm/xe/xe_ras.c > +++ b/drivers/gpu/drm/xe/xe_ras.c > @@ -1515,6 +1515,10 @@ int xe_ras_init(struct xe_device *xe) > */ > xe_ras_process_errors(xe); > =20 > + /* Fail probe if the device is already wedged due to errors */ > + if (xe_wedged(xe)) > + return -ENOTRECOVERABLE; [Severity: High] Does failing probe here undo the runtime survivability and wedge recovery actions that xe_ras_process_errors() just set up? When xe_ras_process_errors() handles a CSC firmware error, handle_soc_internal_errors() calls xe_survivability_mode_runtime_enable(), which creates devm-managed survivability sysfs attributes and calls xe_wedge_declare(xe, DRM_WEDGE_RECOVERY_VENDOR). Returning -ENOTRECOVERABLE from xe_ras_init() aborts xe_device_probe() and causes the driver core to run devres_release_all(), which immediately removes the survivability sysfs files via xe_survivability_mode_fini() and leaves the device unbound without initializing NVM or HECI GSC to flash the firmware. For Punit, CSC, and memory errors alike, aborting probe in xe_ras_init() also prevents drm_dev_register() from running and runs xe_wedge_fini() + xe_driver_flr_fini() during devres teardown. As a result, the DRM wedged uevent queued by xe_wedge_declare() is cancelled before the primary DRM minor device is registered, and xe_driver_flr_fini() issues an immediate Driver-FLR (because xe_wedge_declare() sets xe->needs_flr_on_fini =3D true) even when cold-reset recovery, vendor firmware flash, or no-reset wedge mode was requested. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201094549.3158= 286-6-riana.tauro@intel.com?part=3D1