]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Add context-based invalidation to GuC TLB invalidation backend
authorMatthew Brost <matthew.brost@intel.com>
Fri, 16 Jan 2026 22:17:31 +0000 (14:17 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Sat, 17 Jan 2026 02:24:57 +0000 (18:24 -0800)
commit6cdaa5346d6f3f6116e607e49c92c2401390c267
tree3ed30cc783a3cd8636527700778d9b55894f016c
parent628d59392cc571930f52e121892c7a72f7c1d65b
drm/xe: Add context-based invalidation to GuC TLB invalidation backend

Introduce context-based invalidation support to the GuC TLB invalidation
backend. This is implemented by iterating over each exec queue per GT
within a VM, skipping inactive queues, and issuing a context-based (GuC
ID) H2G TLB invalidation. All H2G messages, except the final one, are
sent with an invalid seqno, which the G2H handler drops to ensure the
TLB invalidation fence is only signaled once all H2G messages are
completed.

A watermark mechanism is also added to switch between context-based TLB
invalidations and full device-wide invalidations, as the return on
investment for context-based invalidation diminishes when many exec
queues are mapped.

v2:
 - Fix checkpatch warnings
v3:
 - Rebase on PRL
 - Use ref counting to avoid racing with deregisters
v4:
 - Extra braces (Stuart)
 - Use per GT list (CI)
 - Reorder put

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Tested-by: Stuart Summers <stuart.summers@intel.com>
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Link: https://patch.msgid.link/20260116221731.868657-12-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_guc_tlb_inval.c