Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 03/13] drm/xe/pf: Force new VFs prorities only once
Date: Thu, 13 Aug 2026 23:28:33 +0000	[thread overview]
Message-ID: <20260813232833.9F4561F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260402191726.4932-4-michal.wajdeczko@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect `num_vfs` argument passed to `pf_config_bulk_set_u32_done()` causes an out-of-bounds log message for VF bounds.
--

--- Patch [3]: [PATCH v2 03/13] drm/xe/pf: Force new VFs prorities only once ---
commit d9a195ee96c85a89ef1ab7a22febed668f958fe6
Author: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: drm/xe/pf: Force new VFs prorities only once

This commit defers forcing VF scheduling priority changes until after the
initial change of the SCHED_IF_IDLE policy, preventing overwrites of
individual per-VF priorities. It also moves the priority change code to the
_config component for proper isolation.

> 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 658e9b048751d..c74745642a925 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c

[ ... ]

> +void xe_gt_sriov_pf_config_force_sched_priority_locked(struct xe_gt *gt, u32 priority)
> +{
> +	unsigned int total_vfs = 1 + xe_gt_sriov_pf_get_totalvfs(gt);
> +	struct xe_gt_sriov_config *config;
> +	unsigned int n;
> +
> +	xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt)));
> +	lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
> +
> +	for (n = 0; n < total_vfs; n++) {
> +		config = pf_pick_vf_config(gt, VFID(n));
> +		config->sched_priority = priority;
> +	}
> +
> +	pf_config_bulk_set_u32_done(gt, PFID, 1 + total_vfs, priority,

[Severity: Low]
Does this pass an incorrect bound for the log message?

The variable total_vfs is already initialized as
1 + xe_gt_sriov_pf_get_totalvfs(gt). Adding 1 again here makes the passed
value 2 + xe_gt_sriov_pf_get_totalvfs(gt), which results in an out-of-bounds
log message indicating settings were applied to an incorrect range of VFs.

> +				    pf_get_sched_priority, "scheduling priority",
> +				    sched_priority_unit, n, 0);
> +}
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260402191726.4932-1-michal.wajdeczko@intel.com?part=3

  reply	other threads:[~2026-08-13 23:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 19:17 [PATCH v2 00/13] drm/xe/pf: Improve EQ/PT provisioning Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 01/13] drm/xe/guc: Update POLICY_SCHED_IF_IDLE documentation Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 02/13] drm/xe/pf: Fix pf_get_sched_priority() function signature Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 03/13] drm/xe/pf: Force new VFs prorities only once Michal Wajdeczko
2026-08-13 23:28   ` sashiko-bot [this message]
2026-04-02 19:17 ` [PATCH v2 04/13] drm/xe/pf: Print applied policy KLVs Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 05/13] drm/xe/pf: Reprovision policy settings after GT reset Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 06/13] drm/xe/pf: Don't reprovision policies if already default Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 07/13] drm/xe/pf: Encode scheduling priority KLV if needed Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 08/13] drm/xe/pf: Check EQ/PT/PRIO when testing VF config Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 09/13] drm/xe/pf: Allow to change sched_if_idle policy under lock Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 10/13] drm/xe/pf: Reprovision scheduling to default when no VFs Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 11/13] drm/xe/pf: Extract helper to show which VFs are provisioned Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 12/13] drm/xe/pf: Extract helpers for bulk EQ/PT provisioning Michal Wajdeczko
2026-04-02 19:17 ` [PATCH v2 13/13] drm/xe/pf: Perform fair scheduling auto-provisioning Michal Wajdeczko
2026-04-03 11:37   ` Michał Winiarski
2026-04-02 19:32 ` ✓ CI.KUnit: success for drm/xe/pf: Improve EQ/PT provisioning (rev2) Patchwork
2026-04-02 20:12 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-03  9:31 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-03 20:48   ` Michal Wajdeczko
2026-04-11 15:55 ` ✓ CI.KUnit: success for drm/xe/pf: Improve EQ/PT provisioning (rev3) Patchwork
2026-04-11 16:38 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-11 18:09 ` ✓ 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=20260813232833.9F4561F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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