From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796250975; b=y1409ClZQ52+/CAER1g7/duc+8ipdzJpv8KM9lCWPiFXqp4bBdW5O7rXyPN7p/GDD46B C21yRTz34kDxUtIk5pyAPQ682CIYH4cPeDno6OhNOOaxZrydzeiRY2o30K4dBL4jkX5aa /t+B9A+nMdQLGjsl8/shqzEU9LVj8wLHsu8WvVfE4/fe7WGDczASLT37cqSHe/AoIase3 zljJpdhJUjkbRj4SqjewQ9DHLpn31DmabzFWW/MayNoZMCpzaIqmKybiCy2zHhB69Yi2L wbsz1ResbJ6Bxh3npv3x2UJdOy1DsbDdF4eFWgFJwjSC9Vm3rn1aWorjcCKHlq8aXNg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796250975; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; bh=dUu1HJ5j4469Iv3VpErPrYAItU2TmGPMkOkeRGfHawA=; b=DhMLezibymy1yzCfLcehT3Yk1V0DbIWfMrmmV2iCUIa23B1EXa3l5yGWAWqNja7HuEzO Oo8dkUAEW6tFcx7jVjMU3jwr+KSHOVdthUDQV5Vpyl9AyqqKujiDdDcWnj+jIwTsLGe0x DvdHSz+seJy1UA0nFsLPhqnRU1j6qQSbH+LJUiHQx95J96XpIhhahhyPoEctuQdq2sowF RR+y0V/sd5NDdZYrlcxUKFbsOToVZ+gcAqMlr4vMD41aTEfQYAsTb847Z8ZV561RpAV7U 0bUmOMkYLSeLZD1OTuGaUsvhTnX/uw/gJ3D+1T3obZXbwHbOsNKS6SRiFCUXUDJgbhQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=aj53ynPG; arc=none smtp.remote-ip=209.85.128.173 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63937606A33D for ; Wed, 2 Dec 2026 22:36:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63937606A33D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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=aj53ynPG Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-8b0ca1ebc8bso122207247b3.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=vger.kernel.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=aj53ynPGsiUSomuixMvY5c89Bovp75jgdiWIu5RGEtoRa3PaHbN3PGevbQ0yFy6sQk BA6OtVb8PXPev59msi9zet6spTHNucif/5dmusLRfmkl+iw1UDuhRFN0Y62hesQvN6BM 1BIXcwT0dV8LRzlmeAn0xTfeVHEphJvXDF7e0IoaXUVyXXLygPFaunWRQ65hp0AXjMTG PjPTfz/vfnXBgGzIPTaFUGQfvyfxQOkP0jddDPXSJJUnN9mdQ6K3SagaCD7qUCelG0uX /635tMD4Hgem8EDmAz+SX0J6p2ZAffKW6wLZsWMtV8hrf0ajTRYmKBEaHbyV8Vw4FYWz Q2mQ== 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=SFzBZowLYTE5JdiSK3rSBLCGz7Hx9wND40tSJLO3G61XvD7EWZdPTlomtUnOwMpz5/ PZ2w05q7Gv9zuaDOXHTC1ywFWi+4aOhj3aVHv9bWfxc1wCd7pRtIO3pJmjJKrYTpJiqk OwgQuKIfMUP857yQfkIzwLvLOirm/mMjZgIwBFkqJG47uJI+zxQFijwqdz5lM2mdyO++ XO7qmTjMHhZ1WrN0/VlehjJpFjbDzrN4PsxETORgfNYmMkBzh3NwY/qPRLqE1ZQcyTdT ShTGA3u/+jwhXHziFFrpaFgbz5nC7z2rPciBWeR7PJBVzpGaVyylJ3jzprbdqVGHvV/B iHfg== X-Forwarded-Encrypted: i=1; AL+hErGXRUtKi7h7jQ1L94X5zjt0saDtJD/NtEL9N8puSYL1UrhEMKwT2zir5cg1PZaRhAf2tJfIDCbBeQl6ES8=@vger.kernel.org X-Gm-Message-State: APuU4Z+bqQi/97A/EsyHjNPwMOQZO2hdGRq4/cqGcKGBxQIbue5ziR9E OXc/Zbd7btg3QxRflobzM7c68o4B8NYi8E0cmO52XJciM+L6X+Bk0Efa X-Gm-Gg: AZFdTZeiQpsQIsxGq5pdFTjXZ//8bLYfAlqrKWYL9Ciz092gWnKpy5yT5Bsldv4tatS tBMO0rY47u0eNeciYgj3WbUorFaBKvGh5p57VU0ml03u+6PqV/OMd20Exm76U6rrDH7zbK02g+o x+VOGotFRX9zUb9GG4Nngj8FwMq2JivP15ydqjBXPxiayaN42d2Tjdv2kysamptopcN+gAetM0L 49JEZItnZ70fjnmkr6GKNfVaqs2TC5wFfWOj2+fKrRAfg50HEXQSEzbTXhKum9oudeu66Dad8hM teUPh2wtpYW4S9fSbEQ8k4dMHAVlpmYSvoA6f0jX5rXDISVbbdUeQSU0U+AvxaexJPcXkBg0NRm e9JOO7fFc7vBuUpmznHEfs7+B66g32kaJuZLeFitnrxSNltOtljQiMQfn2hKqiWYUpyChIuxYMp SxpZjY1C82JU+ZDL02VzXbQsGOhxzsHj9kQocg7ozfQ8D7TkeDFsa2H5IhAIgkrSKbAa52bk6FR ksVBBz0lD089L9nfnGWHzEOSZ3vE+Xam3yVWFTVYzplmjszQgDuM+2aEkCnzt9MtajGMAeD6du4 KYgipWWhmCo0S/0x6YeFCsTEZcXJN9mpL8SasXjq3m2Wn4kxmw90cDEE+gyS+djM3Q2JbjNbV+H Hs8GJWVmIaKpvbrOS6N9AgjX9UAOktFzOD6TmsCR6jYjHiD1UpmExP42+zzw+ek+/yhP3vWj7Jp R4QGLmrr3075aEZmSd+Sk= 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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