Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/tlb_inval: Squash wedged error in GGTT TLB invalidation
@ 2026-09-10 23:27 Shuicheng Lin
  2026-09-10 23:35 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Shuicheng Lin @ 2026-09-10 23:27 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin, Sk Anirban, Matthew Brost

A GGTT TLB invalidation issued on a wedged device fails with
-ENOTRECOVERABLE. xe_tlb_inval_issue_op_wait() only squashes -ECANCELED,
so the error reaches ggtt_invalidate_gt_tlb() and trips its
xe_gt_WARN(). The resulting taint turns an otherwise passing
igt@xe_exec_reset@gt-reset-fault-injection run into an abort:

  *ERROR* SIGID=102 FATAL (-EIO) WEDGED: Device declared wedged!
  Tile0: GT1: Failed to invalidate GGTT (-ENOTRECOVERABLE)
  WARNING: drivers/gpu/drm/xe/xe_ggtt.c:588 at ggtt_invalidate_gt_tlb
  Workqueue: xe-guc-destroy-wq __guc_exec_queue_destroy_async [xe]
   ggtt_node_remove+0xe3/0x100 [xe]
   xe_ggtt_node_remove+0x3f/0xa0 [xe]
   xe_ggtt_remove_bo+0x89/0x2c0 [xe]
   xe_ttm_bo_destroy+0xcb/0x330 [xe]
   ...
   xe_lrc_destroy+0x74/0x90 [xe]
   xe_exec_queue_fini+0x2d/0x60 [xe]

send_tlb_inval_ggtt() only checks that the CT is enabled, not that the
device is usable, so a wedged device still takes the CT send path. There
__guc_ct_send_locked() tests xe_device_wedged() before it looks at the
CT state and drops the message. It can never be delivered, so report it
as cancelled instead.

Fixes: 50fa9acac26f ("drm/xe/guc: distinguish wedged from recoverable cancellation")
Assisted-by: Claude:claude-opus-5
Cc: Sk Anirban <sk.anirban@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_tlb_inval.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_tlb_inval.c b/drivers/gpu/drm/xe/xe_guc_tlb_inval.c
index 111fef781b2a..578cafa5526d 100644
--- a/drivers/gpu/drm/xe/xe_guc_tlb_inval.c
+++ b/drivers/gpu/drm/xe/xe_guc_tlb_inval.c
@@ -75,8 +75,14 @@ static int send_tlb_inval_ggtt(struct xe_tlb_inval *tlb_inval, u32 seqno)
 			seqno,
 			MAKE_INVAL_OP(XE_GUC_TLB_INVAL_GUC),
 		};
+		int ret;
 
-		return send_tlb_inval(guc, action, ARRAY_SIZE(action));
+		ret = send_tlb_inval(guc, action, ARRAY_SIZE(action));
+		/* Device wedged: message not delivered */
+		if (ret == -ENOTRECOVERABLE)
+			return -ECANCELED;
+
+		return ret;
 	} else if (xe_device_uc_enabled(xe) && !xe_device_wedged(xe)) {
 		struct xe_mmio *mmio = &gt->mmio;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-11  9:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 23:27 [PATCH] drm/xe/tlb_inval: Squash wedged error in GGTT TLB invalidation Shuicheng Lin
2026-09-10 23:35 ` ✓ CI.KUnit: success for " Patchwork
2026-09-10 23:41 ` [PATCH] " sashiko-bot
2026-09-11  0:31 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-09-11  9:56 ` ✓ Xe.CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox