From: "Lis, Tomasz" <tomasz.lis@intel.com>
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v7 1/5] drm/xe/ggtt: Assert lower bound of GGTT PTE address
Date: Wed, 28 Oct 2026 16:50:31 +0100 [thread overview]
Message-ID: <b5feede2-2494-49f5-b96a-e093a168fd4f@intel.com> (raw)
In-Reply-To: <20261021085716.709503-2-piotr.piorkowski@intel.com>
On 2026-10-21 10:57, Piórkowski, Piotr wrote:
> From: Piotr Piórkowski <piotr.piorkowski@intel.com>
>
> Since ggtt->start was introduced, the GGTT range no longer begins at
> address 0, but the PTE accessors still check only the upper bound of
> the address.
>
> Also assert that the address is not below ggtt->start, so that stale or
> miscomputed addresses (e.g. after a VF GGTT shift) are caught as well.
>
> Suggested-by: Tomasz Lis <tomasz.lis@intel.com>
> Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
-Tomasz
> ---
> drivers/gpu/drm/xe/xe_ggtt.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 773777afc68a2..2d890fe74c1b0 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -240,6 +240,7 @@ u64 xe_ggtt_size(struct xe_ggtt *ggtt)
> static void xe_ggtt_set_pte(struct xe_ggtt *ggtt, u64 addr, u64 pte)
> {
> xe_tile_assert(ggtt->tile, !(addr & XE_PTE_MASK));
> + xe_tile_assert(ggtt->tile, addr >= ggtt->start);
> xe_tile_assert(ggtt->tile, addr < ggtt->start + ggtt->size);
>
> writeq(pte, &ggtt->gsm[addr >> XE_PTE_SHIFT]);
> @@ -254,6 +255,7 @@ static void xe_ggtt_set_pte_and_flush(struct xe_ggtt *ggtt, u64 addr, u64 pte)
> static u64 xe_ggtt_get_pte(struct xe_ggtt *ggtt, u64 addr)
> {
> xe_tile_assert(ggtt->tile, !(addr & XE_PTE_MASK));
> + xe_tile_assert(ggtt->tile, addr >= ggtt->start);
> xe_tile_assert(ggtt->tile, addr < ggtt->start + ggtt->size);
>
> return readq(&ggtt->gsm[addr >> XE_PTE_SHIFT]);
next prev parent reply other threads:[~2026-10-28 15:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 8:57 [PATCH v7 0/5] Separate GGTT pools for submissions and VFs provisioning Piórkowski, Piotr
2026-10-21 8:57 ` [PATCH v7 1/5] drm/xe/ggtt: Assert lower bound of GGTT PTE address Piórkowski, Piotr
2026-10-28 15:50 ` Lis, Tomasz [this message]
2026-10-21 8:57 ` [PATCH v7 2/5] drm/xe/ggtt: Introduce full GGTT range size Piórkowski, Piotr
2026-10-28 15:56 ` Lis, Tomasz
2026-10-21 8:57 ` [PATCH v7 3/5] drm/xe/ggtt: Split GGTT into usable and shareable pools Piórkowski, Piotr
2026-10-28 23:59 ` Lis, Tomasz
2026-10-21 8:57 ` [PATCH v7 4/5] drm/xe/ggtt: Initialize GGTT pools by SR-IOV mode Piórkowski, Piotr
2026-10-28 15:23 ` Lis, Tomasz
2026-10-21 8:57 ` [PATCH v7 5/5] drm/xe/ggtt: Add KUnit tests for usable and shareable pools Piórkowski, Piotr
2026-10-27 16:31 ` Jani Nikula
2026-10-29 12:12 ` Piotr Piórkowski
2026-10-21 9:04 ` ✗ CI.checkpatch: warning for Separate GGTT pools for submissions and VFs provisioning (rev7) Patchwork
2026-10-21 9:06 ` ✓ CI.KUnit: success " Patchwork
2026-10-21 9:44 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-21 12:03 ` ✗ 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=b5feede2-2494-49f5-b96a-e093a168fd4f@intel.com \
--to=tomasz.lis@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@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