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 5FBA4606A322 for ; Fri, 4 Dec 2026 19:59:48 +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=kSUcjn6L Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AF8110E72E; Fri, 4 Dec 2026 19:59:43 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38E5310E89B for ; Fri, 4 Dec 2026 19:59:36 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E69AA404F0; Fri, 4 Dec 2026 19:59:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA8BC1F00A12; Fri, 4 Dec 2026 19:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796414375; bh=dDgALa0pHYNlZVmoIj1FISkvYue+e7yOcVrnOy/TuMM=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=kSUcjn6LzNmumjE/CF6U+X5u9TTp8+e/igE2+GJosoGsuAVeBdAPNVcMGhF6x/0dB p1N8eOaO/w4EBeVEt1NB2cvLktNV7Mctyrlj/UXLpG/ekwuTIrpVey5B/aNOs3QKSL zX18CGwN5LjDru7eFwv+nuUvEEHZanUDrtIDlVK705e+smwdM+gDtNVat5qNq0lT2a GWchsrIm58BMhZY7MFgcTaLsyJlnE/dHZWlIBVvizD9RMKqD8JdFMV6FzzvwXW9KEY PBsKmJMR3jNAf3pn8QRP6h+jFmgoGF41S7P4LYZWzNlpyo9WjnXnpm19c7+PXM4Spp CFXZbpVyJaxiQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 3/6] drm/xe/uc: Add FW file fallback support To: "Daniele Ceraolo Spurio" , intel-xe@lists.freedesktop.org In-Reply-To: <20261204193456.1035581-11-daniele.ceraolospurio@intel.com> References: <20261204193456.1035581-8-daniele.ceraolospurio@intel.com> <20261204193456.1035581-11-daniele.ceraolospurio@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 19:59:35 +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=-11.2 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 4 potential issues to consider: - [Low] drm/xe/uc: false fallback warning on user-overridden firmware path - [Low] drm/xe/uc: uc_fw_vf_override() leaves stale wanted_path for xe_uc_fw_print() - [Low] drm/xe: uc_fw_request() omits missing firmware filename on -ENOENT - [Low] drm/xe: xe_uc_fw_check_version_requirements() misreports override as fallback -- commit ea10bcbf948cd65162dcd530c37f512adf516565 Author: Daniele Ceraolo Spurio drm/xe/uc: Add FW file fallback support This commit adds fallback support when loading uC firmware files so that if the preferred firmware blob is missing, the driver can try older matching entries in the firmware table while tracking both the wanted and comparison versions. > diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c > index d0ea059239fa0..2099543021663 100644 > --- a/drivers/gpu/drm/xe/xe_uc_fw.c > +++ b/drivers/gpu/drm/xe/xe_uc_fw.c [ ... ] > @@ -376,13 +397,21 @@ static int guc_read_css_info(struct xe_uc_fw *uc_fw= , struct uc_css_guc_info *guc > int xe_uc_fw_check_version_requirements(struct xe_uc_fw *uc_fw) > { > struct xe_device *xe =3D uc_fw_to_xe(uc_fw); > - struct xe_uc_fw_version *wanted =3D &uc_fw->versions.wanted; > + struct xe_uc_fw_version *wanted =3D &uc_fw->versions.comparison; > struct xe_uc_fw_version *found =3D &uc_fw->versions.found[uc_fw->versio= ns.wanted_type]; > + bool need_update =3D false; > =20 > /* Driver has no requirement on any version, any is good. */ > if (!wanted->major) > return 0; > =20 > + if (uc_fw->wanted_path !=3D uc_fw->path) { > + drm_notice(&xe->drm, > + "%s firmware: using fallback path %s instead of the recommended %s= \n", > + xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, uc_fw->wanted_path); > + need_update =3D true; > + } [Severity: Low] Can this falsely warn about a fallback path when firmware is overridden via module parameter? In uc_fw_request(), uc_fw_override() replaces uc_fw->path with the modparam pointer while leaving uc_fw->wanted_path pointing to the table entry. Because the pointers always differ, any overridden GuC or GSC firmware emits the fallback notice and linux-firmware update message. Guarding this check with !xe_uc_fw_is_overridden(uc_fw) would avoid that. [ ... ] > @@ -803,8 +843,8 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, cons= t struct firmware **firmwar > XE_UC_FIRMWARE_ERROR); > =20 > if (err =3D=3D -ENOENT) > - xe_gt_info(gt, "%s firmware %s not found\n", > - xe_uc_fw_type_repr(uc_fw->type), uc_fw->path); > + xe_gt_info(gt, "%s firmware not found\n", > + xe_uc_fw_type_repr(uc_fw->type)); > else > xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n", > xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err)); [Severity: Low] Does dropping the path here hide which firmware file is missing from default dmesg logs? firmware_request_nowarn() suppresses the loader's own warning and fallback attempts only log at xe_gt_dbg(), so on -ENOENT dmesg no longer reports the missing filename (even on single-entry platforms or with a mistyped modparam override). Exhausting the fallback loop also leaves uc_fw->path as NULL, so on platforms >=3D XE_BATTLEMAGE where xe_gsc_init() continues without GSC firmware, debugfs gsc_info prints (null) as the path. Logging uc_fw->path ?: uc_fw->wanted_path (or restoring wanted_path on exhaustion) would keep the filename visible. [ ... ] > @@ -1045,8 +1085,8 @@ void xe_uc_fw_print(struct xe_uc_fw *uc_fw, struct = drm_printer *p) > { > int i; > =20 > - drm_printf(p, "%s firmware: %s\n", > - xe_uc_fw_type_repr(uc_fw->type), uc_fw->path); > + drm_printf(p, "%s firmware: %s [wanted %s]\n", > + xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, uc_fw->wanted_path); > drm_printf(p, "\tstatus: %s\n", > xe_uc_fw_status_repr(uc_fw->status)); [Severity: Low] Will this print stale host firmware paths on SR-IOV VFs and [wanted (null)] for unsupported firmwares? uc_fw_auto_select() sets uc_fw->wanted_path before the IS_SRIOV_VF(xe) check in uc_fw_request(), and uc_fw_vf_override() only updates uc_fw->path (to NULL for GSC and "Loaded by PF" for GuC/HuC) without clearing uc_fw->wanted_path. Clearing uc_fw->wanted_path in uc_fw_vf_override() and only printing [wanted %s] when wanted_path is non-NULL and differs from path would keep debugfs output consistent. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204193456.1035= 581-8-daniele.ceraolospurio@intel.com?part=3D3