]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/vf: Abort H2G sends during VF post-migration recovery
authorMatthew Brost <matthew.brost@intel.com>
Wed, 8 Oct 2025 21:45:08 +0000 (14:45 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 10:22:28 +0000 (03:22 -0700)
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 <matthew.brost@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20251008214532.3442967-11-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_guc_ct.c

index 47079ab9922c61fbcd27fad495675e5bca1f5b23..9f0090ae64a60fe69ccad7d04c231462ee47bd7a 100644 (file)
@@ -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;
        }