Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: jose.souza@intel.com, carlos.santa@intel.com
Subject: [PATCH v3 5/9] drm/xe: Add cpu_caching to properties line in VM snapshot capture
Date: Thu, 20 Mar 2025 12:28:27 -0700	[thread overview]
Message-ID: <20250320192831.3842138-6-matthew.brost@intel.com> (raw)
In-Reply-To: <20250320192831.3842138-1-matthew.brost@intel.com>

Add CPU caching to properties line in VM snapshot capture indicating
the BO caching properites. This is useful information for debug and
will help build a robust GPU hang replay tool.

The current format is:

[<vma address>]: <permissions>|<type>|mem_region=0x%x|pat_index=%d|cpu_caching=%d

Permissions has two options, either "read_only" or "read_write".

Type has three options, either "userptr", "null_sparse", or "bo".

Memory region is a bit mask of where the memory is located.

Pat index corresponds to the value setup upon VM bind.

CPU caching corresponds to the value of BO setup upon creation.

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 34bec27a5f45..94bf056da5b9 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3859,7 +3859,7 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
 	for (i = 0; i < snap->num_snaps; i++) {
 		drm_printf(p, "[%llx].length: 0x%lx\n", snap->snap[i].ofs, snap->snap[i].len);
 
-		drm_printf(p, "[%llx].properties: %s|%s|mem_region=0x%lx|pat_index=%d\n",
+		drm_printf(p, "[%llx].properties: %s|%s|mem_region=0x%lx|pat_index=%d|cpu_caching=%d\n",
 			   snap->snap[i].ofs,
 			   snap->snap[i].flags & XE_VM_SNAP_FLAG_READ_ONLY ?
 			   "read_only" : "read_write",
@@ -3869,7 +3869,8 @@ void xe_vm_snapshot_print(struct xe_vm_snapshot *snap, struct drm_printer *p)
 			   "userptr" : "bo",
 			   snap->snap[i].uapi_mem_region == -1 ? 0 :
 			   BIT(snap->snap[i].uapi_mem_region),
-			   snap->snap[i].pat_index);
+			   snap->snap[i].pat_index,
+			   snap->snap[i].bo ? snap->snap[i].bo->cpu_caching : 0);
 
 		if (IS_ERR(snap->snap[i].data)) {
 			drm_printf(p, "[%llx].error: %li\n", snap->snap[i].ofs,
-- 
2.34.1


  parent reply	other threads:[~2025-03-20 19:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 19:28 [PATCH v3 0/9] Add support for Mesa GPU hang replay tool Matthew Brost
2025-03-20 19:28 ` [PATCH v3 1/9] drm/xe: Add properties line to VM snapshot capture Matthew Brost
2025-03-20 19:28 ` [PATCH v3 2/9] drm/xe: Add "null_sparse" type to VM snap properties Matthew Brost
2025-03-20 19:28 ` [PATCH v3 3/9] drm/xe: Add mem_region to properties line in VM snapshot capture Matthew Brost
2025-03-25  9:41   ` Maarten Lankhorst
2025-03-20 19:28 ` [PATCH v3 4/9] drm/xe: Add pat_index " Matthew Brost
2025-03-20 19:28 ` Matthew Brost [this message]
2025-03-20 19:28 ` [PATCH v3 6/9] drm/xe: Add VM.uapi_flags to " Matthew Brost
2025-03-20 19:28 ` [PATCH v3 7/9] drm/xe/uapi: Add DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE Matthew Brost
2025-03-20 19:28 ` [PATCH v3 8/9] drm/xe: Add replay_offset and replay_length lines to LRC HWCTX snapshot Matthew Brost
2025-03-20 19:28 ` [PATCH v3 9/9] drm/xe: Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE Matthew Brost
2025-03-25 10:25   ` Maarten Lankhorst
2025-03-20 19:32 ` ✓ CI.Patch_applied: success for Add support for Mesa GPU hang replay tool (rev3) Patchwork
2025-03-20 19:32 ` ✗ CI.checkpatch: warning " Patchwork
2025-03-20 19:34 ` ✓ CI.KUnit: success " Patchwork
2025-03-20 19:50 ` ✓ CI.Build: " Patchwork
2025-03-20 19:52 ` ✓ CI.Hooks: " Patchwork
2025-03-20 19:54 ` ✓ CI.checksparse: " Patchwork
2025-03-20 20:13 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-03-20 21:18 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250320192831.3842138-6-matthew.brost@intel.com \
    --to=matthew.brost@intel.com \
    --cc=carlos.santa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox