Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Jia Yao <jia.yao@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <matthew.auld@intel.com>, <gwan-gyeong.mun@intel.com>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v4 3/3] drm/xe/guc_ads: use uncached mapping for UM queue BO
Date: Thu, 30 Jul 2026 11:49:30 +0200	[thread overview]
Message-ID: <54ffd2c7-4901-48c3-bfd8-00cff5852c2d@intel.com> (raw)
In-Reply-To: <20260730004735.344627-4-jia.yao@intel.com>



On 7/30/2026 2:47 AM, Jia Yao wrote:
> The HW unit that writes fault descriptors into the UM queue ring buffer
> may not be coherent with the CPU cache.  If a descriptor write is still
> sitting in a GPU L3 cache line when GuC reads the slot, GuC sees the
> stale (all-zero) content from DRAM and forwards an invalid descriptor to
> the driver (Faulted Address = 0, ASID = 0).
> 
> Mark the UM queue BO as uncached (XE_BO_FLAG_NEEDS_UC) so that writes
> bypass the cache and are immediately visible to GuC.
> 
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")

note that XE_BO_FLAG_NEEDS_UC flag is not available at this point

it was initially added as XE_BO_NEEDS_UC flag in a commit f15de1936f8d
and then renamed to XE_BO_FLAG_NEEDS_UC in commit 62742d126631451

> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jia Yao <jia.yao@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_ads.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
> index 53636333fb45..76029575aa45 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
> @@ -412,7 +412,8 @@ int xe_guc_ads_init(struct xe_guc_ads *ads)
>  		u32 um_flags = XE_BO_FLAG_VRAM_IF_DGFX(tile) |
>  			       XE_BO_FLAG_GGTT |
>  			       XE_BO_FLAG_GGTT_INVALIDATE |
> -			       XE_BO_FLAG_PINNED_NORESTORE;
> +			       XE_BO_FLAG_PINNED_NORESTORE |
> +			       XE_BO_FLAG_NEEDS_UC;
>  
>  		bo = xe_managed_bo_create_pin_map(xe, tile, um_size, um_flags);
>  		if (IS_ERR(bo))


  reply	other threads:[~2026-07-30  9:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  5:34 [PATCH v3 0/1] drm/xe/guc_ads: allocate UM queues in a separate UC BO Jia Yao
2026-07-22  5:34 ` [PATCH v3 1/1] " Jia Yao
2026-07-22  9:18   ` Matthew Auld
2026-07-22 23:00   ` Gwan-gyeong Mun
2026-07-22  5:41 ` ✗ CI.checkpatch: warning for " Patchwork
2026-07-22  5:42 ` ✓ CI.KUnit: success " Patchwork
2026-07-22  6:17 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-22 20:20 ` ✓ Xe.CI.FULL: " Patchwork
2026-07-30  0:47 ` [PATCH v4 0/1] " Jia Yao
2026-07-30  0:47   ` [PATCH v4 1/3] drm/xe/guc_ads: allocate UM queues in a separate BO Jia Yao
2026-07-30 10:28     ` Matthew Auld
2026-07-30  0:47   ` [PATCH v4 2/3] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX Jia Yao
2026-07-30 10:51     ` Matthew Auld
2026-07-30 13:12       ` Matthew Auld
2026-07-31  0:52         ` Matthew Brost
2026-07-30  0:47   ` [PATCH v4 3/3] drm/xe/guc_ads: use uncached mapping for UM queue BO Jia Yao
2026-07-30  9:49     ` Michal Wajdeczko [this message]
2026-07-30 11:23     ` Matthew Auld
2026-07-30 23:27 ` [PATCH v5 0/1] drm/xe/guc_ads: allocate UM queues in a separate UC BO Jia Yao
2026-07-30 23:27   ` [PATCH v5 1/3] drm/xe/guc_ads: allocate UM queues in a separate BO Jia Yao
2026-07-30 23:27   ` [PATCH v5 2/3] drm/xe/guc_ads: allocate UM queues in VRAM on dGFX Jia Yao
2026-07-30 23:27   ` [PATCH v5 3/3] drm/xe/guc_ads: use uncached mapping for UM queue BO Jia Yao

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=54ffd2c7-4901-48c3-bfd8-00cff5852c2d@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=gwan-gyeong.mun@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jia.yao@intel.com \
    --cc=matthew.auld@intel.com \
    --cc=stable@vger.kernel.org \
    /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