drm/xe/ggtt: fault on unmapped GGTT for multi-queue platforms

Engines cache GGTT translations in their TLBs.
A full context restore on engine switch flushes these, so a stale
translation for an unmapped and recycled range does not survive.

During a secondary queue append, GuC does a lite-restore and skips the
full context restore, so engine TLB invalidations are missed. This was
observed while running multi-queue tests on another OS.

If unmapped GGTT points to scratch, such a stale access silently reads
scratch instead of faulting, masking the error. On multi-queue
platforms skip allocating the scratch page so unmapped GGTT holds
PTE=0 and faults consistently for the whole boot; other platforms keep
scratch and are unaffected.

v2:
- Add xe_gt_has_multi_queue() helper and address nits (Niranjana)
v3:
- Drop scratch entirely instead of toggling per-unmap (Matt Brost)
v5:
- Document the rationale (Matt Roper / Matt Brost)

Assisted-by: Claude:claude-opus-4-8
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260827082011.3370672-2-tilak.tirumalesh.tangudu@intel.com
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
Tangudu Tilak Tirumalesh 2026-08-27 13:50:09 +05:30 • committed by Shuicheng Lin
commit ee460b8855
2 changed files with 38 additions and 15 deletions