From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
jonathan.cavitt@intel.com, mripard@kernel.org, airlied@gmail.com,
simona@ffwll.ch, linux-kernel@vger.kernel.org,
intel-xe@lists.freedesktop.org, Rodrigo.vivi@intel.com,
matthew.brost@intel.com, maarten.lankhorst@linux.intel.com,
thomas.hellstrom@linux.intel.com, tzimmermann@suse.de
Subject: [PATCH 2/2] drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report
Date: Wed, 27 May 2026 05:44:46 +0800 [thread overview]
Message-ID: <20260526214446.3638616-3-jonathan.cavitt@intel.com> (raw)
In-Reply-To: <20260526214446.3638616-1-jonathan.cavitt@intel.com>
Add the SRCID of the faulting hardware unit to the return of the
xe_vm_get_property_ioctl fault report.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/xe/xe_vm.c | 11 +++++++++--
drivers/gpu/drm/xe/xe_vm_types.h | 2 ++
include/uapi/drm/xe_drm.h | 4 ++--
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 080c2fff0e95..18d5cdafd76b 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -636,6 +636,7 @@ void xe_vm_add_fault_entry_pf(struct xe_vm *vm, struct xe_pagefault *pf)
pf->consumer.fault_type_level);
e->fault_level = FIELD_GET(XE_PAGEFAULT_LEVEL_MASK,
pf->consumer.fault_type_level);
+ e->srcid = pf->consumer.srcid;
list_add_tail(&e->list, &vm->faults.list);
vm->faults.len++;
@@ -4108,6 +4109,11 @@ static u8 xe_to_user_fault_level(u8 fault_level)
return fault_level;
}
+static u8 xe_to_user_srcid(u8 srcid)
+{
+ return srcid;
+}
+
static int fill_faults(struct xe_vm *vm,
struct drm_xe_vm_get_property *args)
{
@@ -4135,6 +4141,8 @@ static int fill_faults(struct xe_vm *vm,
fault_entry.fault_type = xe_to_user_fault_type(entry->fault_type);
fault_entry.fault_level = xe_to_user_fault_level(entry->fault_level);
+ fault_entry.srcid = xe_to_user_srcid(entry->srcid);
+
memcpy(&fault_list[i], &fault_entry, entry_size);
i++;
@@ -4190,8 +4198,7 @@ int xe_vm_get_property_ioctl(struct drm_device *drm, void *data,
int ret = 0;
if (XE_IOCTL_DBG(xe, (args->reserved[0] || args->reserved[1] ||
- args->reserved[2] || args->extensions ||
- args->pad)))
+ args->reserved[2] || args->extensions)))
return -EINVAL;
vm = xe_vm_lookup(xef, args->vm_id);
diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
index 635ed29b9a69..e8aea75341cc 100644
--- a/drivers/gpu/drm/xe/xe_vm_types.h
+++ b/drivers/gpu/drm/xe/xe_vm_types.h
@@ -196,6 +196,7 @@ struct xe_device;
* @access_type: type of address access that resulted in fault
* @fault_type: type of fault reported
* @fault_level: fault level of the fault
+ * @srcid: ID of the faulting hardware unit
*/
struct xe_vm_fault_entry {
struct list_head list;
@@ -204,6 +205,7 @@ struct xe_vm_fault_entry {
u8 access_type;
u8 fault_type;
u8 fault_level;
+ u8 srcid;
};
struct xe_vm {
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 48e9f1fdb78d..2b45b691a032 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -1294,8 +1294,8 @@ struct xe_vm_fault {
#define FAULT_LEVEL_PML4 3
#define FAULT_LEVEL_PML5 4
__u8 fault_level;
- /** @pad: MBZ */
- __u8 pad;
+ /** @srcid: ID of the faulting hardware unit */
+ __u8 srcid;
/** @reserved: MBZ */
__u64 reserved[4];
};
--
2.53.0
next prev parent reply other threads:[~2026-05-26 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 21:44 [PATCH 0/2] drm/xe/pagefault: Add SRCID to pagefault reporting Jonathan Cavitt
2026-05-26 21:44 ` [PATCH 1/2] drm/xe/pagefault: Add SRCID to pagefault struct Jonathan Cavitt
2026-05-27 4:00 ` Claude review: " Claude Code Review Bot
2026-05-26 21:44 ` Jonathan Cavitt [this message]
2026-05-27 4:00 ` Claude review: drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report Claude Code Review Bot
2026-05-27 4:00 ` Claude review: drm/xe/pagefault: Add SRCID to pagefault reporting Claude Code Review Bot
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=20260526214446.3638616-3-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=Rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=alex.zuo@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=saurabhg.gupta@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
/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