Re: [PATCH v4 3/3] drm/xe/guc_ads: use uncached mapping for UM queue BO

Matthew Auld <[email protected]> Thu, 30 Jul 2026 12:23:18 +0100
Newsgroups org.freedesktop.lists.intel-xe,org.kernel.vger.stable
Message-ID <[email protected]>
On 30/07/2026 01:47, 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")

As per Michal this is too old. I think we can instead do:

Fixes: 9c57bc08652a ("drm/xe/lnl: Drop force_probe requirement")
Cc: <[email protected]> # v6.12+

> Cc: Gwan-gyeong Mun <[email protected]>
> Cc: Matthew Auld <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jia Yao <[email protected]>

Reviewed-by: Matthew Auld <[email protected]>

> ---
>   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))