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 45CCD606A680 for ; Wed, 2 Dec 2026 22:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=YGP31126 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D21E112594; Wed, 2 Dec 2026 22:36:21 +0000 (UTC) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B1C0112591 for ; Wed, 2 Dec 2026 22:36:15 +0000 (UTC) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-8b0ca1ebc8bso122207257b3.2 for ; Wed, 02 Dec 2026 14:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796250974; x=1796855774; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dUu1HJ5j4469Iv3VpErPrYAItU2TmGPMkOkeRGfHawA=; b=YGP31126j09nO70gyzJIHOm3RYIi8+17Q0eTZP1IrMEvneiBMBkYM1ZOP2r/TYOlIF advOyoxAgn6a5+PN66rV6zgDueexLwydurXWjBMvgCBAeap2xgbBYpEH3HZuCP+HY5YI 4aLIED3RHxdlJqo4Af1Cvcqb66+zUdypK/fIWqMVGj4mtsmtdWoK3kJJFHHOM2auKBeY HuLVyJZEFHJx9j0bKmy8DNd4bglI06eMLqEDdnnYKjdEKq8O26y/JAvf/PT8IlD8zwlm pjhBsUs7rRfzAZe3bH2QQTQIo7GW9R1j0kd20p8Mg91EWPuIrIA32tvEu5EssUQcL9/B 6wXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796250974; x=1796855774; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dUu1HJ5j4469Iv3VpErPrYAItU2TmGPMkOkeRGfHawA=; b=nZFSnNfyFAovxRA5Vqq/8w/532d5jT9A8LFdNjcEJxqPUqFWKRBIMEUvVldwZJlJ48 tJJICAhpsiU+AmWNq+rdP/vjUMw6luL3aP8gZ3oPgNkubrZPKmrfJWuFecIG8YJgo6dF Tj5Cb0Jkq2aZ82rDfCmTtMRsliMvS+ayEEeK6HKJOVbrokQAZ+mlLiIOsmvGgyVIlXRt msFyGp/qt+/MGcyRNT5mF4IUdGr0hh2TC2xt7GtKofW6fFY47ZqXKg0diGQqYXRV+e+q NtTR0gqg8dATlTm5UvEFNhIeYk4JFul1ZdpwPFn0RuQQHaNI7E3x3+jHaZdBkY46zGHT jiwQ== X-Gm-Message-State: APuU4Z8udFYQgAJ3WWGFYleqSbIVf/FXbMFNn14mVyEpxTcAGuwH9DzP aWIpDrAQWKpVqyyDjHcD+GKqAFs+MvwbNmPY5QSuqXmjc51+y8mRVNNS X-Gm-Gg: AZFdTZf9srR7iGDPFYwWC+YsrJNT7Wg3JfIcNH99kdFXQ14AM+d9Wr0OwP8AVU5VZKM v5flxb7JGPtL96pa5HpjegdTQWXIbMuwixLKlB3lf8ksMJO4Wk/+letJtL/NLW0Vf9HTE0x+Knk evhxObokT7gSbADU7TYyDBxdkLI3n5ISJNV12lRe1LbCvzxQzxaNm7fxXlPELd+s+t7vcYVODAc Bd69ccR/+BtmDcajIdj5PMokslzx/FgU7dacYeeYB821ywcHAj08rwljO6hC0fBnOEid2f7VnpK K8tKbZg3a6ZdVm6LB1LmrSuLvlWkrz2BqQLTw9+ugIgw6d7blAHXmKbVjhspmzOBTIB3xT571DU GoUP73KS851DjGOBZLny6rsGxhY9s9LADOFP1i5gmpo5uJkgrh84A0WPm9HO4WZhIEYEStKURys NvZuZg3+ogkvZQjOuwQVni+yf9ADJtbY7OKuLW9GbcTdZkz08k6uTbloOTucwIbrjzAcJvOBAUG SeLHsuqmEkWwRPGlG5BbRlwSPqEwjFNOobsx0MRkNNH5ftlxlPcXljT7GbHp3SOhN9yriy+GCVY 5nw8Aw+a3AKmYhdsvrqvhE0y35dD6pkyzJEyH+e2iDfbxFaGr95hg9nAWnypFo42ix0gVWnN4Jg uD+qcNrLTG45sxyrJtgqlw1lcWgT52BOa/N9TmGM81Rkvl5oA+mhxc7kKcI3YjWDzos/ohyW8tv b5xDd5WsE4Tz+lcLSivz4= X-Received: by 2002:a05:690c:6182:b0:8a0:76e8:c738 with SMTP id 00721157ae682-8b5201f370cmr186776107b3.0.1796250974285; Wed, 02 Dec 2026 14:36:14 -0800 (PST) Received: from localhost (107-220-129-194.lightspeed.chrlnc.sbcglobal.net. [107.220.129.194]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b5203325adsm165424327b3.37.2026.12.02.14.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 14:36:13 -0800 (PST) From: Matt Turner Date: Wed, 02 Dec 2026 17:36:08 -0500 Subject: [PATCH 02/14] drm/amdgpu: only give the hung job to its own device's coredump X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-amdgpu-devcoredump-v1-2-3dfa0e033b97@gmail.com> References: <20261202-amdgpu-devcoredump-v1-0-3dfa0e033b97@gmail.com> In-Reply-To: <20261202-amdgpu-devcoredump-v1-0-3dfa0e033b97@gmail.com> To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Sunil Khatri , Trigger Huang Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Matt Turner X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2399; i=mattst88@gmail.com; h=from:subject:message-id; bh=9IgeKnopApUTyjcm+xXPNA+1eQ1XT2BzeTZIl2kgWKU=; b=owGbwMvMwCW25rVmCc8sv+mMp9WSGLIF5kY4iWgo5PwONFL/zcOrWMse+/LUIafigIsFU4tSh dx2f+nv+MjCIMbFMFNMkSVuvSLLrLYdS31OS/+CmcPKBDJEWqSBAQhYGPhyE/NKjXSM9Ey1DfUM gQwdo3iInB6DRmZxcWlqkW5aQZFDXn5JYklmfl6xXn5Bal5BeoFeWmZaSUZGflFxKtAIvbzUElN XRzcjQwMTS0cLMycLR1MTZ2cnQyc3R0dnVycjS3MTA2dLRxNXS3MGLk4BmGskQhj+aakGTOFn+p t1UMQ78fkZnqdJx20vzXH3aJgxZYXnA72wKIZ/5ks770Z5n7/C4jDfV/9hlJTBZReHHo/985c7f /krYaLCAAA= X-Developer-Key: i=mattst88@gmail.com; a=openpgp; fpr=3BB639E56F861FA2E86505690FDD682D974CA72A 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: , Sender: "amd-gfx" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 The job timeout handler takes a coredump for every device in an XGMI hive and passes the hung job to each of them. The coredumps of the other devices then name a ring of the requesting device as the one that timed out, and include the IBs of a job that never ran on them. Pass the job only to the coredump of the device it was submitted to. amdgpu_device_reinit_after_reset() does the same, but cannot hit it since commit c67db6a6a6be ("drm/amdgpu: Do core dump immediately when job tmo"): the timeout handler is the only caller that gives amdgpu_device_gpu_recover() a job, and it sets AMDGPU_SKIP_COREDUMP. Change it too, so that it stays correct if another caller passes a job. Fixes: 5e592956cc36 ("drm/amdgpu: add ring timeout information in devcoredump") Fixes: c67db6a6a6be ("drm/amdgpu: Do core dump immediately when job tmo") Signed-off-by: Matt Turner --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 85a22af69ba4..4a98a667526d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5262,7 +5262,9 @@ int amdgpu_device_reinit_after_reset(struct amdgpu_reset_context *reset_context) vram_lost = amdgpu_device_check_vram_lost(tmp_adev); if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags)) - amdgpu_coredump(tmp_adev, false, vram_lost, reset_context->job); + amdgpu_coredump(tmp_adev, false, vram_lost, + tmp_adev == reset_context->reset_req_dev ? + reset_context->job : NULL); if (vram_lost) { dev_info( diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index 8689a3c933b2..fa13d7beba80 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -77,7 +77,7 @@ static void amdgpu_job_core_dump(struct amdgpu_device *adev, /* Do the coredump for each device */ list_for_each_entry(tmp_adev, device_list_handle, reset_list) - amdgpu_job_do_core_dump(tmp_adev, job); + amdgpu_job_do_core_dump(tmp_adev, tmp_adev == adev ? job : NULL); if (hive) { mutex_unlock(&hive->hive_lock); -- 2.56.1