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 19015606A31A for ; Wed, 2 Dec 2026 09:26:38 +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=DWXh45Di Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B042310FFAF; Wed, 2 Dec 2026 09:26:32 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B29E10FFA7 for ; Wed, 2 Dec 2026 09:26:26 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id DB2A541232; Wed, 2 Dec 2026 09:26:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B03431F000C1; Wed, 2 Dec 2026 09:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796203585; bh=AQjeBn+So5CN/ULKkKQHGeqAkkIsTkfZ1k2pLfd40Sk=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=DWXh45DiSQPHhsyroBZWPrTguDsuDMTKzd/L2e+9FI0EEyLAAdLNcwy3ASZNsW9Ya MviHFwx3D8BS0ff46e/1APq2+wMpH2pQLbz54ysFf1kKgaqK7dUuqCWr0/6hdNYpRW yIe+P5fH/11Kmz4V8f0+MqJ7fPYhevu2BUx+gCVlUr47n40t7cHAAwVGUA4iFx7Mad C3+ihtXHx1VdsSZkjA00pYLU0d7ga0VM1IhUProU5c2U0B8idmetEF+LVL/8JpP2vn MyxrOnxwlSFfSxxCYNxsCXKYW8Astdv/1PLe2LtpfX0+doE9u3j4cupU5msajIaf5n hoqmzg3kvd5rg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] drm/amdgpu: skip PCI slot reset and resume if the device was not prepared To: "Yifan Zhang" , amd-gfx@lists.freedesktop.org In-Reply-To: <20261202091435.3183770-1-yifan1.zhang@amd.com> References: <20261202091435.3183770-1-yifan1.zhang@amd.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 09:26:25 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "amd-gfx" 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 no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] drm/amdgpu: wrong device used for KFD init in amdgpu_device_gpu_resume() [1] -- commit 117b3201e4109fecb8f7e0d137a2aaccfd1dfee9 Author: Lejun Zhu drm/amdgpu: skip PCI slot reset and resume if the device was not prepared This commit tracks whether amdgpu_pci_error_detected() halted the device and acquired the reset domain lock so that amdgpu_pci_slot_reset() and amdgpu_pci_resume() do not attempt recovery or unlock a reset domain lock they do not hold. > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm= /amd/amdgpu/amdgpu_device.c > index 7cf3a4cbac27c..b2889f59be291 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c [ ... ] > @@ -6467,6 +6486,7 @@ void amdgpu_pci_resume(struct pci_dev *pdev) > amdgpu_device_sched_resume(&device_list, NULL, NULL); > amdgpu_device_gpu_resume(adev, &device_list, false); > amdgpu_device_recovery_put_reset_lock(adev, &device_list); > + adev->pcie_reset_ctx.reset_prepared =3D false; [Severity: High] This problem wasn't introduced by this patch, but in amdgpu_device_gpu_resume() [1], should the KFD initialization check and amdgpu_amdkfd_device_init() call use the loop iterator tmp_adev instead of adev? drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:amdgpu_device_gpu_resume() { ... list_for_each_entry(tmp_adev, device_list, reset_list) { if (!need_emergency_restart && !amdgpu_sriov_vf(tmp_adev)) amdgpu_amdkfd_post_reset(tmp_adev); if (!adev->kfd.init_complete) amdgpu_amdkfd_device_init(adev); ... } In a multi-GPU reset recovery, checking and initializing adev on each iteration leaves KFD uninitialized on any other device in device_list where kfd.init_complete is false. [1] https://sashiko.dev/#/bug/linux-5cf51b39-dfd5-4eaf-89c5-a3b47f0fd56b --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202091435.3183= 770-1-yifan1.zhang@amd.com?part=3D1