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 4804F606A6AC for ; Thu, 3 Dec 2026 09:15:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=UZ9c5zTw Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0553F10E0FE; Thu, 3 Dec 2026 09:15:50 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 086CF10E0FE for ; Thu, 3 Dec 2026 09:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796289344; x=1827825344; h=message-id:date:mime-version:subject:from:to:references: in-reply-to:content-transfer-encoding; bh=tn6nOpgIUfGMSe4lhrE1FzkZVlB4ix4srFmtQ/HG1gs=; b=UZ9c5zTwhNa+0GmDG+TO4M7aYzN6End5XY5cXWydZNBZbeOSOwNDb7a4 jXxdKQQdsQHF/X0krmblX9utwUJuK6yKO8jbeuYXO/8vtuYVAIHa1Cc8W Ld8wx+Yk6JhdYx03drzTqA6APLYnBIeaBfK5b87cYeO3nfFqatfQUJXG9 Crjvu75WrdDJ8Uz9zkvYzZUdBUcDlZo4dBtn/ax+4IFqmI0BQmhGYbaxA RwHShZI7h0nZGokq1Qbx3WKE6lGHkGKHqWj+2kQJyl0WB2GNq6oYjAAn/ JHKgS3SFXYIYw7snnlujnRSLrJNIJqI3GguV9obLMfgP8LpRBnoctAcqU w==; X-CSE-ConnectionGUID: LqculHMoQ/S7b5ByhNuTxQ== X-CSE-MsgGUID: AjUAcQHVQZyrYH8gTGakcA== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5149685" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5149685" Received: from fmviesa012.fm.intel.com ([10.60.135.152]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 01:15:43 -0800 X-CSE-ConnectionGUID: Q3QZPpmwSOWEPODdC0Gdrw== X-CSE-MsgGUID: 5nNszgr2TLK3yOgOTI45sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="15410488" 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 01:15:43 -0800 Message-ID: <552fa4ad-df09-459b-9633-cfe3d839b616@linux.intel.com> Date: Thu, 3 Dec 2026 10:15:41 +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 From: "Bernatowicz, Marcin" 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 In-Reply-To: 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/3/2026 9:19 AM, Bernatowicz, Marcin wrote: > > 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); >> LGTM, Reviewed-by: Marcin Bernatowicz