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 9EE4ACCD184 for ; Mon, 6 Oct 2025 11:10:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EEC910E416; Mon, 6 Oct 2025 11:10:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Ye9Jg+ky"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09BE310E35D for ; Mon, 6 Oct 2025 11:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1759749044; x=1791285044; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=kiz+jerG8Hx1DiGBkWQWSS6oHpKcTCE/T9d9vU2nJ8M=; b=Ye9Jg+ky/4Vta2ntewR71J8D1VN79yUoLY2CH9/gxxOe7jNYeU1hqGpL ue7vSE2JdhHjtky04TVyd3f2gkeYBWShLXkXPZxR5otAFUJH0cafBEYA5 iOIKTx7cprfmaIZmr0cD4UBrMrtkFy2xW2SiMGaFEgKwNURpaO7gYqUHi adad84/5FedcBHQbfs8d0HnheohQW1RM6AWf+OR8CtabNREN/G3f+yrv5 AsbEiQvD6/cxK5+SZNp8TCQsEradA8yHPDd6q1Poyv7jnzHYn7gC1e6ah V2G/LwcCJw3JWavbMQKV/gc7GGn8R7otd6wFCcoj3HDLH3lwJpF7otYI8 w==; X-CSE-ConnectionGUID: 3utWPT8zQ+2E2Xr0LKbqIA== X-CSE-MsgGUID: fq+OII06Q/GSWjT1UoK4nw== X-IronPort-AV: E=McAfee;i="6800,10657,11573"; a="73020385" X-IronPort-AV: E=Sophos;i="6.18,319,1751266800"; d="scan'208";a="73020385" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2025 04:10:44 -0700 X-CSE-ConnectionGUID: 7wR1A4fKTo6kgOlRZzGfbA== X-CSE-MsgGUID: OM2XZRchSI+0zwo1jS4hhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,319,1751266800"; d="scan'208";a="180655224" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2025 04:10:43 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Subject: [PATCH v6 09/30] drm/xe/vf: Abort H2G sends during VF post-migration recovery Date: Mon, 6 Oct 2025 04:10:17 -0700 Message-Id: <20251006111038.2234860-10-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251006111038.2234860-1-matthew.brost@intel.com> References: <20251006111038.2234860-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" While VF post-migration recovery is in progress, abort H2G sends with -ECANCEL. These messages are treated as lost, and TLB invalidation errors are suppressed. During this phase, the H2G channel is down, and VF recovery requires the CT lock to proceed. v3: - Use xe_gt_recovery_inprogress (Michal) Signed-off-by: Matthew Brost Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 47079ab9922c..9f0090ae64a6 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -851,7 +851,7 @@ static int __guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action, u32 len, u32 g2h_len, u32 num_g2h, struct g2h_fence *g2h_fence) { - struct xe_gt *gt __maybe_unused = ct_to_gt(ct); + struct xe_gt *gt = ct_to_gt(ct); u16 seqno; int ret; @@ -872,7 +872,7 @@ static int __guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action, goto out; } - if (ct->state == XE_GUC_CT_STATE_STOPPED) { + if (ct->state == XE_GUC_CT_STATE_STOPPED || xe_gt_recovery_pending(gt)) { ret = -ECANCELED; goto out; } -- 2.34.1