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 4F2C7606A32F for ; Fri, 4 Dec 2026 17:52:41 +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=n1/lkool Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17B8410E648; Fri, 4 Dec 2026 17:52:36 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7A8110EC42 for ; Fri, 4 Dec 2026 17:52:29 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E694F6152A; Fri, 4 Dec 2026 17:52:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8804F1F0093B; Fri, 4 Dec 2026 17:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796406748; bh=LXN65TYQCxtLq8B0VnlgHa67DpO0hLuJoA3C2hPCLQk=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=n1/lkoolKfJvTyB4MrxWFAiCK809/KYooy9Ja+aIRTAlgLzZPO0eygZIcjkpyCiFq 72N4OOch750K1s6HLteLUHNMvIoO/JqE3+iC3A0LKxQOb1lnIZJNHhMIs9NroFvkzn 3fEAEeXfkduq6v1acTNN0lGmkmrbYlTfomyRGBh03oI61pCWPe3embLzqZiPW7bDmV l2xaEXfNY2e7D9IFbvGxIskiM2DeMfHQLqkwItOaAd12rkYXnLGpHw8Y38Q+xubG3Z 6j2y3zWhOIcCUNSJfE3/+lcQFkLLZ0yTKxsMewaOOIkGlX2tE//Q2VG/id7V7dvRf7 vE72BPI7TCGWw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RFC 09/11] drm/xe/guc: Register VF-accessible registers for error capture To: "Satyanarayana K V P" , intel-xe@lists.freedesktop.org In-Reply-To: <20261204144712.3520695-22-satyanarayana.k.v.p@intel.com> References: <20261204144712.3520695-13-satyanarayana.k.v.p@intel.com> <20261204144712.3520695-22-satyanarayana.k.v.p@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 17:52:28 +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=-16.2 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 5 potential issues to consider: - [Medium] drm/xe/guc: VF capture lists missing from xe_hpg_lists and xe_lp_lists - [Medium] drm/xe/guc: PF-owned RING_HWS_PGA left in VF capture register lists - [Medium] drm/xe/guc: GT-global SFC_DONE registers exposed in VF capture list - [Medium] drm/xe/guc: RING_EXECLIST_SQ_CONTENTS exposed in VF capture lists - [Low] drm/xe/guc: commit message omits PF-only rationale and Xe3p-only scope -- commit 228223cb9db744854f25f4fc783254a025baa753 Author: Satyanarayana K V P > drm/xe/guc: Register VF-accessible registers for error capture > > Separate the capture register set into common and PF only register sets > and register common register sets for both PF and VF. > > Signed-off-by: Satyanarayana K V P > Cc: Piotr Pi=C3=B3rkowski > Cc: Micha=C5=82 Winiarski > Cc: Daniele Ceraolo Spurio [Severity: Low] Could the commit message explain why RING_HWSTAM, GFX_MODE, and RING_PSMI_CTL are moved to PF-only sets while the remaining registers stay VF-accessible? It also says common register sets are registered for both PF and VF without noting that VF lists are only wired into xe3p_lists, leaving xe_hpg_lists and xe_lp_lists PF-only. > diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_= guc_capture.c > index e528b3e9d158c..49a15f86eca8e 100644 > --- a/drivers/gpu/drm/xe/xe_guc_capture.c > +++ b/drivers/gpu/drm/xe/xe_guc_capture.c > @@ -106,13 +106,11 @@ struct __guc_capture_parsed_output { > { FORCEWAKE_GT, REG_32BIT, 0, 0, 0, "FORCEWAKE_GT"} > =20 > #define COMMON_BASE_ENGINE_INSTANCE \ > - { RING_HWSTAM(0), REG_32BIT, 0, 0, 0, "HWSTAM"}, \ > { RING_HWS_PGA(0), REG_32BIT, 0, 0, 0, "RING_HWS_PGA"}, \ [Severity: Medium] Should RING_HWS_PGA(0) also move into COMMON_BASE_ENGINE_INSTANCE_PF_ONLY alongside RING_HWSTAM(0)? xe_hw_engine_enable_ring() writes the PF's Global HWSP GGTT address to RING_HWS_PGA on PF only. Leaving it in all VF capture lists in xe3p_lists[] could leak that PF GGTT address into a VF's capture buffer on an engine hang or cause GuC to reject the capture. [ ... ] > @@ -138,6 +136,10 @@ struct __guc_capture_parsed_output { > { RING_BUFFER_HEAD_PREEMPT_REG(0), REG_32BIT, 0, 0, 0, "RING_BUFFER_HE= AD_PREEMPT_REG"}, \ > { RING_BB_ADDR_DIFF(0), REG_32BIT, 0, 0, 0, "RING_BB_ADDR_DIFF"} \ > =20 > +#define COMMON_BASE_ENGINE_INSTANCE_PF_ONLY \ > + { RING_HWSTAM(0), REG_32BIT, 0, 0, 0, = "HWSTAM"}, \ > + { GFX_MODE(0), REG_32BIT, 0, 0, 0, = "GFX_MODE"} [Severity: Medium] Does COMMON_BASE_ENGINE_INSTANCE still expose RING_EXECLIST_SQ_CONTENTS_LO/HI to VFs across all six VF engine-instance capture lists? Those registers hold the 64-bit LRC descriptor written to Execlist Submit Queue slot 0 and are not cleared by hardware. If a VF hang collides with GuC submitting a preempting PF or co-resident VF descriptor, capturing them could leak another tenant's GGTT LRCA and context ID unless GuC scrubs them. Moving RING_EXECLIST_SQ_CONTENTS_LO/HI into COMMON_BASE_ENGINE_INSTANCE_PF_ONLY (or documenting a GuC scrubbing guarantee) would avoid this cross-tenant leak. [ ... ] > @@ -193,6 +197,7 @@ static const struct __guc_mmio_reg_descr xe_lp_global= _regs[] =3D { > /* Render / Compute Per-Engine-Instance */ > static const struct __guc_mmio_reg_descr xe_rc_inst_regs[] =3D { > COMMON_BASE_ENGINE_INSTANCE, > + COMMON_BASE_ENGINE_INSTANCE_PF_ONLY > }; [Severity: Medium] Should VF capture lists also be added to xe_hpg_lists and xe_lp_lists, including a VF counterpart for xe_rc_inst_regs? pf_check_vf_debug_support() enables VF debug state capture on every SR-IOV platform running GuC >=3D 70.84.0 without restricting to Xe3p, and guc_capture_get_device_reglist() selects xe_hpg_lists or xe_lp_lists for all SR-IOV platforms with GRAPHICS_VER < 35 (such as BMG, PTL, ATS-M, and ADL). Because only xe3p_lists has VF entries, guc_capture_prep_lists() gets -ENODATA for every VF list on pre-Xe3p platforms and points every VF capture slot in ADS to null_ggtt, silently producing empty VF error captures. [ ... ] > @@ -307,16 +347,28 @@ static const struct __guc_mmio_reg_descr_group xe3p= _lists[] =3D { [ ... ] > MAKE_REGLIST(xe_vec_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLAS= S_VIDEOENHANCE), > + MAKE_REGLIST(xe_vec_class_regs, VF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLAS= S_VIDEOENHANCE), [Severity: Medium] Should VF VIDEOENHANCE ENGINE_CLASS use empty_regs_list instead of xe_vec_class_regs? xe_vec_class_regs captures all four GT-global SFC_DONE(0..3) registers, while every other VF GLOBAL and ENGINE_CLASS entry uses empty_regs_list or is omitted. On a VECS hang, this could expose PF or co-resident VF SFC pipeline state across media slices unless GuC filters them for VF captures. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204144712.3520= 695-13-satyanarayana.k.v.p@intel.com?part=3D9