Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B8A2606A31A for ; Mon, 23 Nov 2026 14:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=na+zwV6D Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E771F10E371; Mon, 23 Nov 2026 14:13:28 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F12C10E07F for ; Mon, 23 Nov 2026 14:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1795443202; x=1826979202; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gtXIndwcXXBrx2xg8QqKnwCVPjfmzZRhPkvvbqwZ0+k=; b=na+zwV6Dp6Kf8uWvSyY4DiRmlolR5w7lj/gvjjbLUUK2tWozDYa+NKem vcTXavT/JjRbdxHV50N3I9535kxR5otxwzo+HlKOXbQVTMWZw+O9wRvll EtxZDArkz2BV3wVx6Ms4eet+toRpXdWv0V4vrKM5w3jMkbbGxS0NvX8ri x5lVVjGWdSWq5Ljby/PPkiEwjB2Z/ibWGFEYL3PP+ZKfNnsGFyDZpu1ta zH3o+jZcAERzVK4ofiR2Zsz1c+FkZVXBbg/1MgEjyEcsKj3febBB5j5b9 8uk2xpMls2ZXiuMi6rz0wKzCeN/SkcuOORQci+4q/EWXivbKbIJbxHh/6 w==; X-CSE-ConnectionGUID: V+YXoENtTbu3O8EAhQsXqw== X-CSE-MsgGUID: gq+SPZt1R/Snkj2z0Wty7A== X-IronPort-AV: E=McAfee;i="6800,10657,11975"; a="4137741" X-IronPort-AV: E=Sophos;i="6.27,227,1787036400"; d="scan'208";a="4137741" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2026 06:13:16 -0800 X-CSE-ConnectionGUID: TbRCrLrJRr2HKiwXWMmI5Q== X-CSE-MsgGUID: IPvWngK+Q1uWEbaKh3d75g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,227,1787036400"; d="scan'208";a="11258778" Received: from gkczarna.igk.intel.com ([10.211.131.163]) by orviesa007.jf.intel.com with ESMTP; 23 Nov 2026 06:13:14 -0800 From: Tomasz Lis To: intel-xe@lists.freedesktop.org Cc: Matthew Brost , =?UTF-8?q?Micha=C5=82=20Winiarski?= , =?UTF-8?q?Piotr=20Pi=C3=B3rkowski?= , Satyanarayana K V P Subject: [PATCH v8 0/3] drm/xe/vf: New approach for post-migration LRC fixups Date: Mon, 23 Nov 2026 15:14:12 +0100 Message-ID: <20261123141415.2304349-1-tomasz.lis@intel.com> X-Mailer: git-send-email 2.43.0 X-Archived-By: 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The current approach to LRC recovery requires caution from developers when modifying any LRC-related code. More flexible solution may allow to avoid future troubles. The current code also includes LRC creation repeat which looks a bit suspicious - it was developed without detailed knowledge of which part of LRC creation requires a repeat. Now after extensive debug we know that the repeat is only required for BO mapping, and actually all BOs should be protected, not only the ones storing LRCs. This fixes a very rare bug where BO would be incorrectly created during migration resulting in CAT error generated by GPU. Chances of triggering this error were well below 0.1%. Included is also a patch which snapshots ctx_restore_post_bb during probe, to avoid creating extra dependencies between locks (especially the newly introduced scratch_lock and xe_configfs.su_mutex). v2: A rebase after 6 months, with adjustments to current source. v3: Re-adding a check carelessly removed in v2, fixed handling GGTT start/end, fixed issue with signals. v4: Several fixes to error paths (mutex creation, and prolonged migration recovery while BO mapping). Altered BO insertion to not repeat placement in GGTT upon migration, only repeat the mapping. v5: Disallow signals affecting BO insertion. Add cleanup of BO mapping on recovery fail. v6: Remove unneeded cleanup, comment on the caveats instead. v7: Fix lockdep splat by snapshoting ctx_restore_post_bb. Use guard for a lock (Satya). v8: Kerneldoc fix. Signed-off-by: Tomasz Lis Cc: Satyanarayana K V P Tomasz Lis (3): drm/xe/lrc: Snapshot configfs ctx_restore_post_bb at probe drm/xe/vf: Late fixups of LRCs after VF migration drm/xe: After VF migration, repeat BO mapping in progress drivers/gpu/drm/xe/xe_device.c | 5 ++ drivers/gpu/drm/xe/xe_device_types.h | 15 ++++++ drivers/gpu/drm/xe/xe_exec_queue.c | 63 +++++++++++++---------- drivers/gpu/drm/xe/xe_exec_queue.h | 2 +- drivers/gpu/drm/xe/xe_ggtt.c | 60 ++++++++++++++++++--- drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 23 +++++---- drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h | 2 + drivers/gpu/drm/xe/xe_guc_submit.c | 35 +++---------- drivers/gpu/drm/xe/xe_guc_submit.h | 2 - drivers/gpu/drm/xe/xe_lrc.c | 42 +++++++++++++-- drivers/gpu/drm/xe/xe_lrc.h | 1 + drivers/gpu/drm/xe/xe_memirq.c | 10 +++- 12 files changed, 176 insertions(+), 84 deletions(-) -- 2.43.0