From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1829CA0EE8 for ; Wed, 17 Sep 2025 03:46:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70F4410E027; Wed, 17 Sep 2025 03:46:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mcPFpjEg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09D1410E644 for ; Wed, 17 Sep 2025 03:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1758080783; x=1789616783; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=2wOgp1Z+kOtEvstlGZhZD8iWzWqecgGHbB2o/dwbm+M=; b=mcPFpjEgJjDM8s2uR1KGmZ4Jz9cD+wjD0DvULfnUYloGN8G+o0DKnTHI V43Fg4J4zdir5dcWiOgfrStKT4O2zQ/PBgCUh07k09Z6Ufp8foZJk5GId +oZlLMZdv1gXn/L/uFpNaxNd9TIt+tCoHg7s8wFBWZVyVkM3Rd3GyLZz4 iqeh/uiXY66eZW6ZVyoallnBkdAV8fPIxzuPrmyh7IZazpaErjAclvG0n 0KBHXOlSjMaOJ9l7OVO21vGtNOO4hujOczDLMdSgCgzt4a9C7tYaYmb9y YlYYVZrRT5oRkQR9HwFTA+ZqShNQ22zSRkKWIRdHlisNAks53VGDGvrEw w==; X-CSE-ConnectionGUID: NI8JsdVZSGiXxpUS+sCwQg== X-CSE-MsgGUID: x2HrKXvMQ3+oqqZorwL1Zg== X-IronPort-AV: E=McAfee;i="6800,10657,11555"; a="71060809" X-IronPort-AV: E=Sophos;i="6.18,270,1751266800"; d="scan'208";a="71060809" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2025 20:46:23 -0700 X-CSE-ConnectionGUID: 1Eyn524rSneEUXohw0fbQA== X-CSE-MsgGUID: 3305ajPVS5GIfhhWUE4xFg== X-ExtLoop1: 1 Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2025 20:46:23 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Subject: [PATCH 27/28] drm/xe/vf: Add debug prints for GuC replaying state during VF recovery Date: Tue, 16 Sep 2025 20:46:14 -0700 Message-Id: <20250917034615.3977603-28-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250917034615.3977603-1-matthew.brost@intel.com> References: <20250917034615.3977603-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Helpful to manually verify the GuC state machine can correctly replay the state during a VF post-migration recovery. All replay paths have been manually verified as triggered and working during testing. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_guc_submit.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index fad6ffcfb83f..57ead5c0e5e1 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -2306,14 +2306,19 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q) pending_enable = exec_queue_pending_enable(q); pending_resume = exec_queue_pending_resume(q); - if (pending_enable && pending_resume) + if (pending_enable && pending_resume) { q->guc->needs_resume = true; + xe_gt_dbg(guc_to_gt(guc), "Replay RESUME - guc_id=%d", + q->guc->id); + } if (pending_enable && !pending_resume && !exec_queue_pending_tdr_exit(q)) { clear_exec_queue_registered(q); if (xe_exec_queue_is_lr(q)) xe_exec_queue_put(q); + xe_gt_dbg(guc_to_gt(guc), "Replay REGISTER - guc_id=%d", + q->guc->id); } if (pending_enable) { @@ -2321,6 +2326,8 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q) clear_exec_queue_pending_resume(q); clear_exec_queue_pending_tdr_exit(q); clear_exec_queue_pending_enable(q); + xe_gt_dbg(guc_to_gt(guc), "Replay ENABLE - guc_id=%d", + q->guc->id); } if (exec_queue_destroyed(q) && exec_queue_registered(q)) { @@ -2330,6 +2337,8 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q) else q->guc->needs_cleanup = true; clear_exec_queue_extra_ref(q); + xe_gt_dbg(guc_to_gt(guc), "Replay CLEANUP - guc_id=%d", + q->guc->id); } pending_disable = exec_queue_pending_disable(q); @@ -2337,6 +2346,8 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q) if (pending_disable && exec_queue_suspended(q)) { clear_exec_queue_suspended(q); q->guc->needs_suspend = true; + xe_gt_dbg(guc_to_gt(guc), "Replay SUSPEND - guc_id=%d", + q->guc->id); } if (pending_disable) { @@ -2344,6 +2355,8 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q) set_exec_queue_enabled(q); clear_exec_queue_pending_disable(q); clear_exec_queue_check_timeout(q); + xe_gt_dbg(guc_to_gt(guc), "Replay DISABLE - guc_id=%d", + q->guc->id); } q->guc->resume_time = 0; @@ -2442,6 +2455,9 @@ static void guc_exec_queue_unpause_prepare(struct xe_guc *guc, list_for_each_entry(s_job, &sched->base.pending_list, list) { job = to_xe_sched_job(s_job); + xe_gt_dbg(guc_to_gt(guc), "Replay JOB - guc_id=%d, seqno=%d", + q->guc->id, xe_sched_job_seqno(job)); + q->ring_ops->emit_job(job); job->skip_emit = true; } -- 2.34.1