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 2B3D2CAC5B0 for ; Thu, 2 Oct 2025 05:54:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D0AA710E7AB; Thu, 2 Oct 2025 05:54:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ckmin16Y"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9330E10E78C for ; Thu, 2 Oct 2025 05:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1759384448; x=1790920448; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=XqODx3wD6jfuRx9dPgIRjhzbrzzLKwQ2QmXdJ3Y0Mkc=; b=ckmin16Y7jOrBL4abUtji0+thPGJ/3G/7kqU1LzVYOtm0LgQ4MQVoZFk KjuoDqPUoe0N0LDKtFwXUo174ePIT77ue170xZUi0KAtOYT1lXEZsLtAr 6ys73pHtLMpjuSMbtxkPeTextLsRnf83ZJY1o84tomaxMkpRzfxRccKhw QfD7LcCB+vpAcuaK1gQWauwPpIrkTOqglePowiGj9/P/AXnpXPg79ps51 HlH00YoQJtbjV3Fxe4pdAoIPjtOikAFTDBvMqXBKAeKeptYy4ks2OUjcs 6e2JYbRT9imPmmpjsRGs5w2Izf8FfeX1LH4yaBengMdgCzWwoBFWAatXm A==; X-CSE-ConnectionGUID: yLEvHpNRTJuFZZJMlTPIcg== X-CSE-MsgGUID: cfhqmauOTw6kuxmwH1exVw== X-IronPort-AV: E=McAfee;i="6800,10657,11569"; a="65304506" X-IronPort-AV: E=Sophos;i="6.18,308,1751266800"; d="scan'208";a="65304506" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2025 22:54:07 -0700 X-CSE-ConnectionGUID: fz2TpSMLSVixm+knwud8zw== X-CSE-MsgGUID: ERQcucgkRlu2jQkKoUCvMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.18,308,1751266800"; d="scan'208";a="216083537" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2025 22:54:07 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org Subject: [PATCH v4 13/34] drm/xe/vf: Abort H2G sends during VF post-migration recovery Date: Wed, 1 Oct 2025 22:53:41 -0700 Message-Id: <20251002055402.1865880-14-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251002055402.1865880-1-matthew.brost@intel.com> References: <20251002055402.1865880-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 | 5 +++-- 1 file changed, 3 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..d0fde371fae3 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,8 @@ 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_inprogress(gt)) { ret = -ECANCELED; goto out; } -- 2.34.1