[PATCH v5 2/8] drm/xe/vf: Skip fixups on migration before getting GGTT info

Tomasz Lis tomasz.lis at intel.com
Thu Jun 12 10:24:43 UTC 2025


The RESFIX state should be achievable only after a successful
handshake. If VF KMD has no GGTT configuration yet and we still got
into RESFIX state, then either we're dealing with unclean initial
state due to unusual actions before probe, or the migration
happened while xe init (started by probe) was running.

In 1st case (migration before probe), we should just skip migration -
init procedure will ensure exit from RESFIX state as it starts GuC
handshake with a reset.

In 2nd case (migration during xe init), the migration procedure should
execute normally if GGTT configuration was already acquired from GuC,
and can be skipped if it was not acquired.

Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Michal Winiarski <michal.winiarski at intel.com>
---
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
index 9b2fc9db55b8..74dcfe693d1c 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
@@ -762,6 +762,15 @@ void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt)
 
 	xe_gt_assert(gt, IS_SRIOV_VF(xe));
 
+	if (!gt->sriov.vf.self_config.ggtt_size) {
+		/*
+		 * If driver initialization is running in parallel to this handler,
+		 * and it did not reached acquiring GGTT config yet, then ignore
+		 * the migration - init procedure will create the GGTT at new place.
+		 */
+		return;
+	}
+
 	set_bit(gt->info.id, &xe->sriov.vf.migration.gt_flags);
 	/*
 	 * We need to be certain that if all flags were set, at least one
-- 
2.25.1



More information about the Intel-xe mailing list