From: Jan Maslak <jan.maslak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org,
"Matthew Auld" <matthew.auld@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: [PATCH 1/2] drm/xe/migrate: Keep access_memory chunks within the transfer limit
Date: Tue, 27 Oct 2026 16:37:40 +0100 [thread overview]
Message-ID: <auDFRMlLvCAPx9BT@ART-DEV-395> (raw)
In-Reply-To: <20261027145237.1862132-1-mika.kuoppala@linux.intel.com>
On Tue, Oct 27, 2026 at 04:52:36PM +0200, Mika Kuoppala wrote:
> xe_migrate_access_memory() caps each chunk at MAX_PREEMPTDISABLE_TRANSFER,
> but xe_migrate_vram() maps the system memory side from the start of the
> page the chunk begins in, DIV_ROUND_UP(len + sram_offset, PAGE_SIZE)
> pages.
>
> So when buf is mid page, the 'wasted' space at the start of the first
> page needs to be taken into account when considering the amount that
> can be copied. Otherwise a full chunk needs one page more than the limit
> allows, which trips the warning in pte_update_cmd_size() and, on debug
> builds, the assert in xe_migrate_vram().
>
> window: |slot 0|slot 1| ... |slot 2047|
> 0 8M
> data: [=================================] starts at sram_offset
> ^ sram_offset ^ must end here or earlier
>
> This happens for example when the access starts at an unaligned vram
> offset.
>
> Fix this by capping the chunk at the limit minus sram_offset.
>
> Seen on BMG with igt@xe_eudebug@vm-access-alignment, which rewrites 24M
> and 48M objects from offset 4 through eudebug vm access:
>
> xe 0000:03:00.0: [drm] Assertion `npages * ((1UL) << 12) <= 0x00800000` failed!
> WARNING: drivers/gpu/drm/xe/xe_migrate.c:2255 at xe_migrate_vram+0xf40/0x15e0 [xe]
> Call Trace:
> xe_migrate_access_memory
> xe_ttm_access_memory
> ttm_bo_access
>
> WARNING: drivers/gpu/drm/xe/xe_migrate.c:2118 at xe_migrate_vram+0xbb7/0x15e0 [xe]
> Call Trace:
> xe_migrate_access_memory
> xe_ttm_access_memory
> ttm_bo_access
>
> Fixes: 270172f64b11 ("drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access")
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Jan Maslak <jan.maslak@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Jan Maslak <jan.maslak@intel.com>
next prev parent reply other threads:[~2026-10-27 15:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 14:52 [PATCH 1/2] drm/xe/migrate: Keep access_memory chunks within the transfer limit Mika Kuoppala
2026-10-27 14:52 ` [PATCH 2/2] drm/xe/tests: Cover a large write to an unaligned bo offset Mika Kuoppala
2026-10-27 15:03 ` sashiko-bot
2026-10-27 15:57 ` Matthew Auld
2026-10-27 18:04 ` Mika Kuoppala
2026-10-28 10:07 ` Matthew Auld
2026-10-27 15:26 ` [PATCH 1/2] drm/xe/migrate: Keep access_memory chunks within the transfer limit Matthew Auld
2026-10-27 15:37 ` Jan Maslak [this message]
2026-10-27 15:37 ` ✗ CI.checkpatch: warning for series starting with [1/2] " Patchwork
2026-10-27 15:40 ` ✓ CI.KUnit: success " Patchwork
2026-10-27 16:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-27 19:52 ` ✓ 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=auDFRMlLvCAPx9BT@ART-DEV-395 \
--to=jan.maslak@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mika.kuoppala@linux.intel.com \
--cc=thomas.hellstrom@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.