From: sashiko-bot@kernel.org
To: "Tejas Upadhyay" <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/xe: Keep VRAM fault injection within the usable range
Date: Thu, 01 Oct 2026 10:01:16 +0000 [thread overview]
Message-ID: <20261001100116.82D1E1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20261001094518.1493651-10-tejas.upadhyay@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] xe: unaligned VRAM fault injection address on PAGE_SIZE > 4K
--
commit ec0c39c567f41b1c9847a4f7270a2e926f7a5f9b
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: drm/xe: Keep VRAM fault injection within the usable range
This commit changes the fault injection probe in xe_ttm_vram_inject_fault()
to start at vr->usable_size rather than vr->actual_physical_size. This keeps
the injected faults within the buddy-managed VRAM range instead of hitting
the CCS/GSM/DSM infrastructure zone.
> diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> index 7211ab5f66e9b..ec15eab1a2edb 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> @@ -988,11 +988,12 @@ int xe_ttm_vram_inject_fault(struct xe_device *xe)
> struct gpu_buddy *mm = &vram_mgr->mm;
> u64 addr;
>
> - if (vr->actual_physical_size < PAGE_SIZE)
> + /* Stay within the buddy-managed range; CCS/GSM/DSM sit beyond usable_size */
> + if (vr->usable_size < PAGE_SIZE)
> return -ENOSPC;
>
> - addr = vr->actual_physical_size - PAGE_SIZE;
> - while (addr < vr->actual_physical_size) {
> + addr = vr->usable_size - PAGE_SIZE;
[Severity: Medium]
Will this result in an unaligned VRAM fault injection address on systems where
PAGE_SIZE > 4K (e.g., ARM64)?
Since vr->usable_size is only guaranteed to be 4K aligned (via
round_down(offset, SZ_4K) in get_flat_ccs_offset()), subtracting a larger
PAGE_SIZE here would produce an address that is not PAGE_SIZE aligned.
If this unaligned address is subsequently passed to
xe_ttm_vram_handle_addr_fault(), will it trigger a WARN_ON_ONCE and fail
the fault injection test with -EINVAL, effectively breaking the debugfs
interface on these architectures?
> + while (addr < vr->usable_size) {
> struct gpu_buddy_block *block;
> bool found = false;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001094518.1493651-6-tejas.upadhyay@intel.com?part=4
next prev parent reply other threads:[~2026-10-01 10:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 9:45 [PATCH 0/4] Followup fixes for memory page offline Tejas Upadhyay
2026-10-01 9:45 ` [PATCH 1/4] drm/xe: Clean up kernel-doc typos in VRAM manager Tejas Upadhyay
2026-10-01 10:25 ` Ghimiray, Himal Prasad
2026-10-01 9:45 ` [PATCH 2/4] drm/xe: Re-validate external pin under resv lock before VRAM purge Tejas Upadhyay
2026-10-05 6:58 ` Ghimiray, Himal Prasad
2026-10-01 9:45 ` [PATCH 3/4] drm/xe: Drop RCU list handling for VRAM bad-page tracking, use mgr->lock Tejas Upadhyay
2026-10-01 10:26 ` Ghimiray, Himal Prasad
2026-10-01 9:45 ` [PATCH 4/4] drm/xe: Keep VRAM fault injection within the usable range Tejas Upadhyay
2026-10-01 10:01 ` sashiko-bot [this message]
2026-10-05 6:13 ` Upadhyay, Tejas
2026-10-01 10:27 ` Ghimiray, Himal Prasad
2026-10-01 9:53 ` ✓ CI.KUnit: success for Followup fixes for memory page offline Patchwork
2026-10-01 13:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-01 17:19 ` ✗ Xe.CI.FULL: failure " 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=20261001100116.82D1E1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tejas.upadhyay@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox