From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v1 2/5] drm/xe/pf: Change provisioning mode under mutex
Date: Tue, 10 Nov 2026 11:46:10 +0100 [thread overview]
Message-ID: <9e2a7049-bfc4-4016-90e1-fa8f2ba9509a@linux.intel.com> (raw)
In-Reply-To: <20261027103009.1259199-3-piotr.piorkowski@intel.com>
LGTM,
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
On 10/27/2026 11:30 AM, Piórkowski, Piotr wrote:
> From: Michal Wajdeczko <michal.wajdeczko@intel.com>
>
> The provisioning mode is changed from the debugfs handlers, but it is
> also checked when VFs are disabled, without any locking. Since we now
> have xe_gt_sriov_pf_config_release_locked(), we can release the VFs
> configuration while holding the master mutex, and do a proper locking
> while changing the provisioning mode and while unprovisioning the VFs.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> ---
> drivers/gpu/drm/xe/xe_sriov_pf_provision.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> index 91670063f706..e713a24b8864 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> @@ -56,9 +56,11 @@ static void pf_unprovision_vfs(struct xe_device *xe, unsigned int num_vfs)
> unsigned int id;
> unsigned int n;
>
> + lockdep_assert_held(xe_sriov_pf_master_mutex(xe));
> +
> for_each_gt(gt, xe, id)
> for (n = 1; n <= num_vfs; n++)
> - xe_gt_sriov_pf_config_release(gt, n, true);
> + xe_gt_sriov_pf_config_release_locked(gt, n, true);
> }
>
> static void pf_unprovision_all_vfs(struct xe_device *xe)
> @@ -98,6 +100,8 @@ int xe_sriov_pf_unprovision_vfs(struct xe_device *xe, unsigned int num_vfs)
> {
> xe_assert(xe, IS_SRIOV_PF(xe));
>
> + guard(mutex)(xe_sriov_pf_master_mutex(xe));
> +
> if (!pf_auto_provisioning_mode(xe))
> return 0;
>
> @@ -166,6 +170,8 @@ int xe_sriov_pf_provision_set_mode(struct xe_device *xe, enum xe_sriov_provision
> {
> xe_assert(xe, IS_SRIOV_PF(xe));
>
> + guard(mutex)(xe_sriov_pf_master_mutex(xe));
> +
> if (mode == xe->sriov.pf.provision.mode)
> return 0;
>
next prev parent reply other threads:[~2026-11-10 10:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 10:30 [PATCH v1 0/5] Prepare SR-IOV provisioning for VGPU profiles Piórkowski, Piotr
2026-10-27 10:30 ` [PATCH v1 1/5] drm/xe/pf: Split the bulk priority provisioning function Piórkowski, Piotr
2026-11-10 10:44 ` Bernatowicz, Marcin
2026-10-27 10:30 ` [PATCH v1 2/5] drm/xe/pf: Change provisioning mode under mutex Piórkowski, Piotr
2026-11-10 10:46 ` Bernatowicz, Marcin [this message]
2026-10-27 10:30 ` [PATCH v1 3/5] drm/xe/pf: Add locked variant of the fair VFs provisioning Piórkowski, Piotr
2026-11-10 10:47 ` Bernatowicz, Marcin
2026-10-27 10:30 ` [PATCH v1 4/5] drm/xe/pf: Provision VFs under mutex Piórkowski, Piotr
2026-11-10 10:48 ` Bernatowicz, Marcin
2026-10-27 10:30 ` [PATCH v1 5/5] drm/xe/pf: Split the provisioning mode change function Piórkowski, Piotr
2026-11-10 10:49 ` Bernatowicz, Marcin
2026-10-27 10:39 ` ✓ CI.KUnit: success for Prepare SR-IOV provisioning for VGPU profiles Patchwork
2026-10-27 11:15 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-27 13:07 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-10 12:36 ` Piotr Piórkowski
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=9e2a7049-bfc4-4016-90e1-fa8f2ba9509a@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@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.