Skip to content

drm/xe: Add prefetch pagefault support for Xe3p

Varun Gupta intel-xe 7 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 0 repliesNew
  2. v52 patches 3 repliesSuperseded
  3. v42 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v3 posting 2/22 patches4 repliesSuperseded
v3 posting 1/22 patches1 replySuperseded
v22 patches3 repliesSuperseded
v12 patches1 replySuperseded

Changes in v6 from the cover letter

- Fix format string mismatch in xe_pagefault_print (CI)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Add counter for invalid prefetch pagefaultsdrivers/gpu/drm/xe/xe_gt_stats.c drivers/gpu/drm/xe/xe_gt_stats_types.h+2 -00 replies
2/2drm/xe: Add prefetch fault support for Xe3pdrivers/gpu/drm/xe/xe_guc_fwif.h drivers/gpu/drm/xe/xe_guc_pagefault.c drivers/gpu/drm/xe/xe_pagefault.c +1 more+25 -110 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLucas De MarchiMatthew Brost
1/2Originally-by R-b
2/2Originally-by R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] drm/xe: Add prefetch pagefault support for Xe3p

Xe3p hardware prefetches memory ranges and notifies software via an additional bit (bit 11) in the page fault descriptor that the fault was caused by prefetch.

Patch 1 adds a dedicated stats counter to track invalid prefetch pagefaults separately from regular faults.

Patch 2 implements the prefetch support by extracting the prefetch bit from the fault descriptor and echoing it in the response (bit 6) only when handling fails. This prevents CAT errors for prefetch faults. For failed prefetch faults, the error is logged at debug level to avoid excessive logging in production settings. The prefetch flag is packed into BIT(7) of the existing access_type field to avoid growing the consumer struct.

Based on original patches by Brian Welty and Priyanka Dandamudi.

v6:
- Fix format string mismatch in xe_pagefault_print (CI)

v5:
- Read prefetch from producer msg in guc_ack_fault, not consumer field (Matt Brost)
- Pack prefetch flag into BIT(7) of access_type instead of separate u8 field (Matt Brost)

v4:
- Downgrade prefetch error log to xe_gt_dbg to avoid spam (Matt Brost/ Stuart)

v3:
- Split stats counter into separate patch (Matt Brost)
- Drop xe_guc_pagefault_types.h rename patch (Matt Brost)
- Move prefetch check to caller of xe_pagefault_print (Matt Brost)
- Rename XE3P_PFD_PREFETCH/PFR_PREFETCH to remove XE3P_ prefix, add comments about Xe3+ platform support (Matt Brost)
- Rename PREFETCH_PAGEFAULT_COUNT to INVALID_PREFETCH_PAGEFAULT_COUNT for clarity (Matt Brost)
- Include prefetch bit value in error message (Matt Brost)

v2:
- Initial implementation combining all changes

Varun Gupta (2):
drm/xe: Add counter for invalid prefetch pagefaults drm/xe: Add prefetch fault support for Xe3p

 drivers/gpu/drm/xe/xe_gt_stats.c        |  1 +
 drivers/gpu/drm/xe/xe_gt_stats_types.h  |  1 +
 drivers/gpu/drm/xe/xe_guc_fwif.h        |  5 +++--
 drivers/gpu/drm/xe/xe_guc_pagefault.c   |  6 +++++-
 drivers/gpu/drm/xe/xe_pagefault.c       | 19 +++++++++++++------
 drivers/gpu/drm/xe/xe_pagefault_types.h |  6 ++++--
 6 files changed, 27 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0