]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/vf: Divide GGTT ballooning into allocation and insertion
authorTomasz Lis <tomasz.lis@intel.com>
Mon, 12 May 2025 11:40:15 +0000 (13:40 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 12 May 2025 13:53:33 +0000 (15:53 +0200)
commitdd39212b5f43577bcd0c4493c0ae4c7828bb55e1
tree786a648d0b98f820a29c81f245bad395d5de4b44
parent5dd933e33b9a2a379bcdefa140b4ee94ea184444
drm/xe/vf: Divide GGTT ballooning into allocation and insertion

The balloon nodes, which are used to fill areas of GGTT inaccessible
for a specific VF, were allocated and inserted into GGTT within one
function. To be able to re-use that insertion code during VF
migration recovery, we need to split it.

This patch separates allocation (init/fini functs) from the insertion
of balloons (balloon/deballoon functs). Locks are also moved to ensure
calls from post-migration recovery worker will not cause a deadlock.

v2: Moved declarations to proper header
v3: Rephrased description, introduced "_locked" versions of some
  functs, more lockdep checks, some functions renamed, altered error
  handling, added missing kerneldocs.
v4: Suffixed more functs with `_locked`, moved lockdep asserts,
  fixed finalization in error path, added asserts
v5: Renamed another few functs, used xe_ggtt_node_allocated(),
  moved lockdep back again to avoid null dereference, added
  asserts, improved comments
v6: Changed params of cleanup_ggtt()

Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20250512114018.361843-2-tomasz.lis@intel.com
drivers/gpu/drm/xe/xe_ggtt.c
drivers/gpu/drm/xe/xe_ggtt.h
drivers/gpu/drm/xe/xe_gt_sriov_vf.c
drivers/gpu/drm/xe/xe_gt_sriov_vf.h