]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/vf: Close multi-GT GGTT shift race
authorMatthew Brost <matthew.brost@intel.com>
Wed, 8 Oct 2025 21:45:12 +0000 (14:45 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 10:22:34 +0000 (03:22 -0700)
commit7dd11d880456f591972eba173bade848359d6a94
treecdd2b5a4567848e6f39a5e9e7881a2721d0231b6
parentc6d00c60c4731604aa0aa6990c8d939e776fc732
drm/xe/vf: Close multi-GT GGTT shift race

As multi-GT VF post-migration recovery can run in parallel on different
workqueues, but both GTs point to the same GGTT, only one GT needs to
shift the GGTT. However, both GTs need to know when this step has
completed. To coordinate this, perform the GGTT shift under the GGTT
lock. With shift being done under the lock, storing the shift value
becomes unnecessary.

In addition to above, move the GGTT VF config from the GT to the tile.

v3:
 - Update commmit message (Tomasz)
v4:
 - Move GGTT values to tile state (Michal)
 - Use GGTT lock (Michal)
v5:
 - Only take GGTT lock during recovery (CI)
 - Drop goto in vf_get_submission_cfg (Michal)
 - Add kernel doc around recovery in xe_gt_sriov_vf_query_config (Michal)
v7:
 - Drop recovery variable (Michal)
 - Use _locked naming (Michal)
 - Use guard (Michal)
v9:
 - Break LMEM changes into different patch (Michal)
 - Fix layering (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-15-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_vf.c
drivers/gpu/drm/xe/xe_gt_sriov_vf.h
drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h
drivers/gpu/drm/xe/xe_tile_sriov_vf.c
drivers/gpu/drm/xe/xe_tile_sriov_vf.h
drivers/gpu/drm/xe/xe_tile_sriov_vf_types.h