From: sashiko-bot@kernel.org
To: "Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v9 07/10] drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE
Date: Fri, 18 Sep 2026 10:41:36 +0000 [thread overview]
Message-ID: <20260918104137.598FE1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918100533.567225-19-satyanarayana.k.v.p@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] xe: mismatch between VF GGTT base alignment and VRAM BO 64K alignment
--
commit e8215b94fc1fb931f84ceb50cd8a30a2324322f3
Author: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE
This patch modifies the Physical Function to align Virtual Function GGTT
ranges to the host CPU page size instead of 64K VRAM alignment. This allows
for finer-grained GGTT partitioning without imposing VRAM alignment
constraints on the GGTT base address.
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> index 6947aeed458ed..a2083d3b2eeeb 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> @@ -441,9 +441,7 @@ static int pf_refresh_vf_cfg(struct xe_gt *gt, unsigned int vfid)
>
> static u64 pf_get_ggtt_alignment(struct xe_gt *gt)
> {
> - struct xe_device *xe = gt_to_xe(gt);
> -
> - return IS_DGFX(xe) && xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ? SZ_64K : SZ_4K;
> + return XE_PAGE_SIZE;
[Severity: High]
Does dropping the 64K alignment requirement for the GGTT base break the
absolute alignment for VRAM BOs in the VF's GGTT?
When the PF allocates the VF's GGTT base at a 4K boundary that is not
64K-aligned, the VF driver will still allocate a VRAM BO requesting 64K
alignment from the relative allocator:
drivers/gpu/drm/xe/xe_ggtt.c:__xe_ggtt_insert_bo_at()
if (xe_bo_is_vram(bo) && ggtt->flags & XE_GGTT_FLAGS_64K)
alignment = SZ_64K;
Because the relative allocator is initialized with a base of 0, the node's
relative offset is 64K-aligned. However, the absolute address
(node->start + ggtt->start) will inherit the unaligned 4K base, defeating
the explicit 64K alignment required by the hardware on DGPUs requiring
64K VRAM pages.
Could this cause hardware page walker faults, or silently break the
alignment of existing mappings if a new ggtt->start during VF migration
has a different alignment modulo 64K?
> }
>
> static u64 pf_get_min_spare_ggtt(struct xe_gt *gt)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918100533.567225-12-satyanarayana.k.v.p@intel.com?part=7
next prev parent reply other threads:[~2026-09-18 10:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 10:05 [PATCH v9 00/10] KUnit test for VF provisioning error handling Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 01/10] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 02/10] drm/xe/vf: Split submission config query helpers Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 03/10] drm/xe/vf: Add bounds checking for queried context and doorbell counts Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 04/10] drm/xe: Introduce helpers for VRAM alignment Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 05/10] drm/xe/ggtt: Avoid integer overflow when validating VF GGTT range Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 06/10] drm/xe/vf: Add bounds checking for queried GGTT base and size Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 07/10] drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE Satyanarayana K V P
2026-09-18 10:41 ` sashiko-bot [this message]
2026-09-18 10:05 ` [PATCH v9 08/10] drm/xe/vf: Add alignment check for queried VRAM size Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 09/10] drm/xe/ggtt: Add KUNIT stub for xe_ggtt_shift_nodes() Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 10/10] drm/xe/tests: Add KUnit tests for VF provisioning error handling Satyanarayana K V P
2026-09-18 10:37 ` sashiko-bot
2026-09-18 10:12 ` ✗ CI.checkpatch: warning for KUnit test for VF provisioning error handling (rev9) Patchwork
2026-09-18 10:14 ` ✓ CI.KUnit: success " Patchwork
2026-09-18 10:53 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-18 19:43 ` ✓ 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=20260918104137.598FE1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=satyanarayana.k.v.p@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