mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: <dri-devel@lists.freedesktop.org>, <saurabhg.gupta@intel.com>,
	<alex.zuo@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>,
	<maarten.lankhorst@linux.intel.com>,
	<thomas.hellstrom@linux.intel.com>, <tzimmermann@suse.de>
Subject: Re: [PATCH v4 2/2] drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report
Date: Mon, 22 Jun 2026 22:13:39 -0700	[thread overview]
Message-ID: <ajoWA6048WpLhdUW@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260618153312.877948-3-jonathan.cavitt@intel.com>

On Thu, Jun 18, 2026 at 11:33:12PM +0800, Jonathan Cavitt wrote:
> Add the SRCID of the faulting hardware unit to the return of the
> xe_vm_get_property_ioctl fault report.
> 
> v2:
> - Readd pad check, as the pad in the ioctl struct was not changed
>   (jcavitt)
> 
> v3:
> - Squash SRCID with ASID to keep the struct compact (Matthew)
> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

But also please get an ack from UMD teams.

Matt

> 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       | 8 ++++++++
>  drivers/gpu/drm/xe/xe_vm_types.h | 2 ++
>  include/uapi/drm/xe_drm.h        | 4 ++--
>  3 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 080c2fff0e95..acbfce19b356 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 = FIELD_GET(XE_PAGEFAULT_SRCID_MASK, pf->consumer.id);
>  
>  	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++;
> 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
> 

      reply	other threads:[~2026-06-23  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 15:33 [PATCH v4 0/2] drm/xe/pagefault: Add SRCID to pagefault reporting Jonathan Cavitt
2026-06-18 15:33 ` [PATCH v4 1/2] drm/xe/pagefault: Add SRCID to pagefault struct Jonathan Cavitt
2026-06-23  5:12   ` Matthew Brost
2026-06-23 14:57     ` Cavitt, Jonathan
2026-06-18 15:33 ` [PATCH v4 2/2] drm/xe/vm: Add srcid to xe_vm_get_property_ioctl fault report Jonathan Cavitt
2026-06-23  5:13   ` Matthew Brost [this message]

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=ajoWA6048WpLhdUW@gsse-cloud1.jf.intel.com \
    --to=matthew.brost@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=jonathan.cavitt@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.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

Powered by JetHome