From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3048F606A32C for ; Thu, 3 Dec 2026 08:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CeYgsZXG Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED59110E103; Thu, 3 Dec 2026 08:19:53 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4CAE010E103 for ; Thu, 3 Dec 2026 08:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796285988; x=1827821988; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=z8DP6jhvU/l//dU5Fja8RJjYN0l+UR2y94p86lEVvmQ=; b=CeYgsZXGISxS9YvvapGSxq5YTqvEaJo0kKwwEW3KAW8Gj06rbest8NvZ kipCnd91fbXOsz7W/Enrr/xEclXo1LTwahGGD2UEflXkWQ7rZT3Q+khdj GZiNimrYy27jwSYsAaO8BRfkHXZiQwzF2RDr+9vuCJbUAN+Box2chHiR9 BrhB0h+IcJJL3/IaBSmC1CsQXl3Y6JDX8Ol2DjHrji5We1MCgwOBG/mGk Ghz1CO0GUZZ8cKl+dScffz51XD/ENVcbjZ7kF4Z6ob9iQtDmtsFqKQzJC HFkFDJqr4FA8B3SiGvBGOH78EnXts+Y/26rPgcJFx8lAMUBmKlJq7IuFR A==; X-CSE-ConnectionGUID: iCINKfKtRQO8R0dw7Ffgqg== X-CSE-MsgGUID: 7asJ8oOeQIKuqTtuu5jhVg== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5279849" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5279849" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 00:19:47 -0800 X-CSE-ConnectionGUID: FpFAjfovT0aKXQ2F0NbowA== X-CSE-MsgGUID: EzN4niT7TL+RGpwDUb14HA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="13556389" Received: from soc-5cg43972f8.clients.intel.com (HELO [172.28.182.154]) ([172.28.182.154]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 00:19:46 -0800 Message-ID: Date: Thu, 3 Dec 2026 09:19:44 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 3/4] drm/xe/pf: Allow to configure preemption timeout for range of VFs To: =?UTF-8?Q?Pi=C3=B3rkowski=2C_Piotr?= , intel-xe@lists.freedesktop.org References: <20261201162219.22723-1-piotr.piorkowski@intel.com> <20261201162219.22723-4-piotr.piorkowski@intel.com> Content-Language: en-US From: "Bernatowicz, Marcin" In-Reply-To: <20261201162219.22723-4-piotr.piorkowski@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 12/1/2026 5:22 PM, Piórkowski, Piotr wrote: > From: Piotr Piórkowski > > We already have a helper to configure preemption timeout for the PF > and all VFs at once. Add a variant that configures only the given > range of VFs, as we will need it to provision VFs using the VGPU > profile, where only VFs defined by the profile shall be provisioned. > > Signed-off-by: Piotr Piórkowski > --- > drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 23 ++++++++++++++++++++++ > drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 3 +++ > 2 files changed, 26 insertions(+) > > 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 d84b5279d7ea2..74e1f91a40bee 100644 > --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c > +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c > @@ -2537,6 +2537,29 @@ int xe_gt_sriov_pf_config_bulk_set_preempt_timeout_locked(struct xe_gt *gt, u32 > return pf_bulk_set_preempt_timeout(gt, preempt_timeout, PFID, 1 + totalvfs); > } > > +/** > + * xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked() - Configure PT for many VFs. > + * @gt: the &xe_gt to configure > + * @vfid: starting VF identifier (can't be 0) > + * @num_vfs: number of VFs to provision > + * @preempt_timeout: requested preemption timeout in microseconds (0 is infinity) > + * > + * This function can only be called on PF with the master mutex held. > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked(struct xe_gt *gt, unsigned int vfid, > + unsigned int num_vfs, > + u32 preempt_timeout) > +{ > + xe_gt_assert(gt, vfid); > + > + if (!num_vfs) > + return 0; > + > + return pf_bulk_set_preempt_timeout(gt, preempt_timeout, vfid, num_vfs); > +} > + > static int pf_provision_groups_preempt_timeouts(struct xe_gt *gt, unsigned int vfid, > const u32 *preempt_timeouts, u32 count) > { > diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h > index 3927b5f4d46c4..1e9d8c65531bb 100644 > --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h > +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h > @@ -74,6 +74,9 @@ u32 xe_gt_sriov_pf_config_get_preempt_timeout_locked(struct xe_gt *gt, unsigned > int xe_gt_sriov_pf_config_set_preempt_timeout_locked(struct xe_gt *gt, unsigned int vfid, > u32 preempt_timeout); > int xe_gt_sriov_pf_config_bulk_set_preempt_timeout_locked(struct xe_gt *gt, u32 preempt_timeout); > +int xe_gt_sriov_pf_config_bulk_set_vfs_preempt_timeout_locked(struct xe_gt *gt, unsigned int vfid, > + unsigned int num_vfs, > + u32 preempt_timeout); Could you include at least one patch that uses this new helper function? > > void xe_gt_sriov_pf_config_get_groups_preempt_timeouts(struct xe_gt *gt, unsigned int vfid, > u32 *preempt_timeout, u32 max_count);