From: sashiko-bot@kernel.org
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 5/7] drm/xe/vram: Allow splitting a region into pools
Date: Mon, 05 Oct 2026 09:43:50 +0000 [thread overview]
Message-ID: <20261005094351.047E21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005093021.3741599-6-piotr.piorkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/xe/vram: kernel pool bounds break fixed-address BIOS takeover
--
commit 822201337f9b8f0df54e932ff7b27d938393e680
Author: Piotr Piórkowski <piotr.piorkowski@intel.com>
drm/xe/vram: Allow splitting a region into pools
This commit adds xe_vram_pool_create() to carve out dedicated pools
from the low addresses of a VRAM region, intended for kernel allocations.
> diff --git a/drivers/gpu/drm/xe/xe_vram.c b/drivers/gpu/drm/xe/xe_vram.c
> index ec95b53bc53b1..1df4f2514afc0 100644
> --- a/drivers/gpu/drm/xe/xe_vram.c
> +++ b/drivers/gpu/drm/xe/xe_vram.c
[ ... ]
> @@ -358,19 +371,88 @@ static int vram_region_init(struct xe_device *xe, struct xe_vram_region *vram,
> +/**
> + * xe_vram_pool_create - Add a pool to a VRAM region
> + * @vram: the VRAM region
> + * @purpose: the purpose served by the new pool
> + * @size: the size of the new pool
> + *
> + * Add a pool at the bottom of @vram and shrink the default pool accordingly.
> + * Existing non-default pools stay at the bottom in creation order. All pools
> + * share the region, the TTM manager and the placement, while the VRAM manager
> + * backs each of them with a buddy allocator of its own.
> + *
> + * The bottom of a region is also where its CPU visible window starts, so on
> + * a small BAR device the new pool takes CPU visible memory away from the
> + * default pool.
> + *
> + * Creating a pool does not make allocations use it. BO placement resolves
> + * pools through the tile, so the caller has to publish the new pool there,
> + * e.g. in &xe_tile.mem.kernel_vram for a kernel-only pool.
> + *
> + * Return: the new pool, or NULL if the pool cannot be created, in particular
> + * once the TTM manager of @vram is initialized.
> + */
> +struct xe_vram_pool *xe_vram_pool_create(struct xe_vram_region *vram,
> + enum xe_vram_pool_purpose purpose, u64 size)
[Severity: Medium]
Will this kernel pool partitioning break the initial display plane takeover?
Currently, initial_plane_bo() allocates the pre-existing BIOS framebuffer
at a fixed physical address using ttm_bo_type_kernel:
drivers/gpu/drm/xe/display/xe_initial_plane.c:initial_plane_bo() {
...
bo = xe_bo_create_pin_map_at_novm(xe, tile0, size, phys_base,
ttm_bo_type_kernel, flags, 0, false);
...
}
When __xe_bo_fixed_placement() processes this, it intersects the fixed
placement address with the kernel pool bounds using xe_vram_pool_place():
drivers/gpu/drm/xe/xe_bo.c:__xe_bo_fixed_placement() {
...
xe_vram_pool_place(bo_vram_pool(xe, flags, vram_flag, type), place);
if (place->lpfn && place->fpfn >= place->lpfn)
return -EINVAL;
...
}
Since the kernel pool is a small carve-out at the bottom of VRAM, if the BIOS
framebuffer resides outside this pool, clamping its bounds will result in
place->fpfn >= place->lpfn, failing the allocation with -EINVAL.
How should fixed-address allocations outside the kernel pool be handled when
they use ttm_bo_type_kernel?
> +{
> + struct xe_device *xe = vram->xe;
> + struct xe_vram_pool *pool;
> + u64 offset;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005093021.3741599-1-piotr.piorkowski@intel.com?part=5
next prev parent reply other threads:[~2026-10-05 9:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 9:30 [PATCH v2 0/7] Introduce purpose-specific VRAM pools Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 1/7] drm/xe: Define partitioned VRAM manager types Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 2/7] drm/xe: Define VRAM regions and pools Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 3/7] drm/xe/vram: Make VRAM pools the allocation handle Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 4/7] drm/xe/ttm: Back each VRAM pool with its own buddy allocator Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 5/7] drm/xe/vram: Allow splitting a region into pools Piórkowski, Piotr
2026-10-05 9:43 ` sashiko-bot [this message]
2026-10-05 9:30 ` [PATCH v2 6/7] drm/xe/kunit: Test partitioned VRAM manager Piórkowski, Piotr
2026-10-05 9:30 ` [PATCH v2 7/7] drm/xe/kunit: Test VRAM pool allocation Piórkowski, Piotr
2026-10-05 10:40 ` ✗ CI.checkpatch: warning for Introduce purpose-specific VRAM pools (rev2) Patchwork
2026-10-05 10:42 ` ✓ CI.KUnit: success " Patchwork
2026-10-05 11:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-05 17:03 ` ✓ 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=20261005094351.047E21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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