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 v8 06/10] drm/xe/vf: Add bounds checking for queried GGTT base and size
Date: Tue, 15 Sep 2026 07:26:46 +0000 [thread overview]
Message-ID: <20260915072646.BD2B31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915071159.51402-18-satyanarayana.k.v.p@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/xe/vf: GGTT alignment uses CPU PAGE_SIZE breaking cross-page-size VMs
--
commit 974f2713618cba9d92f6442eb0ec21fab7f11630
Author: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
drm/xe/vf: Add bounds checking for queried GGTT base and size
This commit adds explicit bounds checks for GGTT base and size queried from
the PF. This is intended to detect and reject invalid configuration data to
prevent protocol violations and protect VF initialization.
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 81d68fe5ad7cd..53db4cf9d656b 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
[ ... ]
> @@ -486,26 +487,62 @@ u32 xe_gt_sriov_vf_gmdid(struct xe_gt *gt)
> return value;
> }
>
> +static u64 vf_get_ggtt_alignment(struct xe_gt *gt)
> +{
> + return PAGE_SIZE;
[Severity: High]
Will this break initialization in cross-page-size virtualization environments
(e.g., a 4KB host and 64KB guest, which is standard on ARM64 and PPC64)?
In such a configuration, the PF driver running on the host allocates a
4KB-aligned GGTT partition. The VF driver running in the guest uses its own
OS PAGE_SIZE (64KB) for alignment checks.
It receives the 4KB-aligned start_query from the PF, aligns it up to 64KB,
and aligns the end down to 64KB. This artificially shrinks the GGTT window.
If the allocated GGTT size is smaller than the alignment difference,
end <= start evaluates to true, and the VF aborts initialization with
-ERANGE.
Should this alignment check use the hardware page size (e.g., XE_PAGE_SIZE)
instead of the CPU page size?
> +}
> +
> static int vf_get_ggtt_info(struct xe_gt *gt)
> {
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915071159.51402-12-satyanarayana.k.v.p@intel.com?part=6
next prev parent reply other threads:[~2026-09-15 7:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 7:11 [PATCH v8 00/10] KUnit test for VF provisioning error handling Satyanarayana K V P
2026-09-15 7:11 ` [PATCH v8 01/10] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
2026-09-15 7:11 ` [PATCH v8 02/10] drm/xe/vf: Split submission config query helpers Satyanarayana K V P
2026-09-15 7:12 ` [PATCH v8 03/10] drm/xe/vf: Add bounds checking for queried context and doorbell counts Satyanarayana K V P
2026-09-15 11:12 ` Michal Wajdeczko
2026-09-15 7:12 ` [PATCH v8 04/10] drm/xe: Introduce helpers for VRAM alignment Satyanarayana K V P
2026-09-15 7:12 ` [PATCH v8 05/10] drm/xe/ggtt: Avoid integer overflow when validating VF GGTT range Satyanarayana K V P
2026-09-15 12:03 ` Michal Wajdeczko
2026-09-15 7:12 ` [PATCH v8 06/10] drm/xe/vf: Add bounds checking for queried GGTT base and size Satyanarayana K V P
2026-09-15 7:26 ` sashiko-bot [this message]
2026-09-15 7:12 ` [PATCH v8 07/10] drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE Satyanarayana K V P
2026-09-15 7:27 ` sashiko-bot
2026-09-15 7:12 ` [PATCH v8 08/10] drm/xe/vf: Add alignment check for queried VRAM size Satyanarayana K V P
2026-09-15 7:12 ` [PATCH v8 09/10] drm/xe/ggtt: Add KUNIT stub for xe_ggtt_shift_nodes() Satyanarayana K V P
2026-09-15 7:12 ` [PATCH v8 10/10] drm/xe/tests: Add KUnit tests for VF provisioning error handling Satyanarayana K V P
2026-09-15 14:33 ` Michal Wajdeczko
2026-09-15 7:19 ` ✗ CI.checkpatch: warning for KUnit test for VF provisioning error handling (rev8) Patchwork
2026-09-15 7:21 ` ✓ CI.KUnit: success " Patchwork
2026-09-15 8:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-15 9:06 ` ✗ 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=20260915072646.BD2B31F000FF@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 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.