From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: "Lis, Tomasz" <tomasz.lis@intel.com>
Cc: intel-xe@lists.freedesktop.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Maarten Lankhorst" <dev@lankhorst.se>
Subject: Re: [PATCH v6 1/4] drm/xe/ggtt: Introduce full GGTT range size
Date: Wed, 21 Oct 2026 09:04:16 +0200 [thread overview]
Message-ID: <20261021070416.jbfgnnp6utwvohje@intel.com> (raw)
In-Reply-To: <a019cc66-f41c-414c-beb6-c4aa4d38321d@intel.com>
Lis, Tomasz <tomasz.lis@intel.com> wrote on śro [2026-paź-21 03:00:38 +0200]:
>
> On 2026-10-20 11:55, Piórkowski, Piotr wrote:
> > From: Piotr Piórkowski <piotr.piorkowski@intel.com>
> >
> > Separate the full assigned GGTT range size from the size available for
> > regular allocations.
> >
> > For now both sizes are identical. A subsequent change will reserve part of
> > the full range for VF provisioning.
> >
> > Assisted-by: Claude:claude-5-sonnet
> > Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Maarten Lankhorst <dev@lankhorst.se>
> > ---
> > drivers/gpu/drm/xe/xe_ggtt.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> > index 773777afc68a2..abcc929c08535 100644
> > --- a/drivers/gpu/drm/xe/xe_ggtt.c
> > +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> > @@ -113,9 +113,11 @@ struct xe_ggtt_pt_ops {
> > struct xe_ggtt {
> > /** @tile: Back pointer to tile where this GGTT belongs */
> > struct xe_tile *tile;
> > - /** @start: Start offset of GGTT */
> > + /** @start: Start offset of the assigned GGTT range */
> > u64 start;
> > - /** @size: Total usable size of this GGTT */
> > + /** @full_size: Full size of the assigned GGTT range */
> > + u64 full_size;
> > + /** @size: Size of the GGTT range for regular use */
> > u64 size;
> > /**
> > * @flags: Flags for this GGTT.
> > @@ -240,7 +242,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 + ggtt->size);
> > + xe_tile_assert(ggtt->tile, addr < ggtt->start + ggtt->full_size);
>
> Looks like the `start` was introduced in "Start using ggtt->start in
> preparation of balloon removal"
>
> back in January, but asserts remained only for the top bound. Shouldn't we
> check the bottom
>
> bound as well? Though that should probably be a separate patch.
Good point, thanks. I'll add the bottom-bound check as a separate patch at the start of the series.
Piotr
> -Tomasz
>
> > writeq(pte, &ggtt->gsm[addr >> XE_PTE_SHIFT]);
> > }
> > @@ -254,7 +256,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 + ggtt->size);
> > + xe_tile_assert(ggtt->tile, addr < ggtt->start + ggtt->full_size);
> > return readq(&ggtt->gsm[addr >> XE_PTE_SHIFT]);
> > }
> > @@ -359,6 +361,7 @@ static const struct xe_ggtt_pt_ops xelpg_pt_wa_ops = {
> > static void __xe_ggtt_init_early(struct xe_ggtt *ggtt, u64 start, u64 size)
> > {
> > ggtt->start = start;
> > + ggtt->full_size = size;
> > ggtt->size = size;
> > drm_mm_init(&ggtt->mm, 0, size);
> > }
--
next prev parent reply other threads:[~2026-10-21 7:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 9:55 [PATCH v6 0/4] Separate GGTT pools for submissions and VFs provisioning Piórkowski, Piotr
2026-10-20 9:55 ` [PATCH v6 1/4] drm/xe/ggtt: Introduce full GGTT range size Piórkowski, Piotr
2026-10-21 1:00 ` Lis, Tomasz
2026-10-21 7:04 ` Piotr Piórkowski [this message]
2026-10-20 9:55 ` [PATCH v6 2/4] drm/xe/ggtt: Split GGTT into usable and shareable pools Piórkowski, Piotr
2026-10-21 1:01 ` Lis, Tomasz
2026-10-21 7:09 ` Piotr Piórkowski
2026-10-20 9:55 ` [PATCH v6 3/4] drm/xe/ggtt: Initialize GGTT pools by SR-IOV mode Piórkowski, Piotr
2026-10-20 9:55 ` [PATCH v6 4/4] drm/xe/ggtt: Add KUnit tests for usable and shareable pools Piórkowski, Piotr
2026-10-20 10:15 ` sashiko-bot
2026-10-20 11:23 ` ✗ CI.checkpatch: warning for Separate GGTT pools for submissions and VFs provisioning (rev6) Patchwork
2026-10-20 11:25 ` ✓ CI.KUnit: success " Patchwork
2026-10-20 12:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-20 14:58 ` ✓ 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=20261021070416.jbfgnnp6utwvohje@intel.com \
--to=piotr.piorkowski@intel.com \
--cc=dev@lankhorst.se \
--cc=intel-xe@lists.freedesktop.org \
--cc=tomasz.lis@intel.com \
--cc=ville.syrjala@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.