[PATCH 1/2] drm/xe/guc: Update VF configuration KLVs definitions
Piotr Piórkowski
piotr.piorkowski at intel.com
Mon Apr 22 12:14:23 UTC 2024
Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on pią [2024-kwi-19 14:35:42 +0200]:
> GuC firmware specification says that maximum value for the execution
> quantum KLV is 100s and anything exceeding that will be clamped.
> The same limitation applies to the preemption timeout KLV.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
> drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> index 511cf974d585..e53ffaee2fcd 100644
> --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> @@ -201,7 +201,11 @@ enum {
> * it to take effect. Such cases might typically happen on a 1PF+1VF
> * Virtualization config enabled for heavier workloads like AI/ML.
> *
> + * The max value for this KLV is 100 seconds, anything exceeding that
> + * will be clamped to the max.
> + *
> * :0: infinite exec quantum (default)
> + * :100000: maximum exec quantum (100000ms == 100s)
> *
> * _`GUC_KLV_VF_CFG_PREEMPT_TIMEOUT` : 0x8A02
> * This config sets the VF-preemption-timeout in microseconds.
> @@ -219,7 +223,11 @@ enum {
> * on a 1PF+1VF Virtualization config enabled for heavier workloads like
> * AI/ML.
> *
> + * The max value for this KLV is 100 seconds, anything exceeding that
> + * will be clamped to the max.
> + *
> * :0: no preemption timeout (default)
> + * :100000000: maximum preemption timeout (100000000us == 100s)
> *
> * _`GUC_KLV_VF_CFG_THRESHOLD_CAT_ERR` : 0x8A03
> * This config sets threshold for CAT errors caused by the VF.
> @@ -291,9 +299,11 @@ enum {
>
> #define GUC_KLV_VF_CFG_EXEC_QUANTUM_KEY 0x8a01
> #define GUC_KLV_VF_CFG_EXEC_QUANTUM_LEN 1u
> +#define GUC_KLV_VF_CFG_EXEC_QUANTUM_MAX_VALUE 100000u
>
> -#define GUC_KLV_VF_CFG_PREEMPT_TIMEOUT_KEY 0x8a02
> -#define GUC_KLV_VF_CFG_PREEMPT_TIMEOUT_LEN 1u
> +#define GUC_KLV_VF_CFG_PREEMPT_TIMEOUT_KEY 0x8a02
> +#define GUC_KLV_VF_CFG_PREEMPT_TIMEOUT_LEN 1u
> +#define GUC_KLV_VF_CFG_PREEMPT_TIMEOUT_MAX_VALUE 100000000u
>
> #define GUC_KLV_VF_CFG_THRESHOLD_CAT_ERR_KEY 0x8a03
> #define GUC_KLV_VF_CFG_THRESHOLD_CAT_ERR_LEN 1u
Your code is ok:
Reviewed-by: Piotr Piórkowski <piotr.piorkowski at intel.com>
But since you are already updating the doc for these values, wouldn't you like to maybe correct
a typo in the doc ? If you don't correct it, it will probably stay there forever.... :
(...)
* _`GUC_KLV_VF_CFG_EXEC_QUANTUM` : 0x8A01
(...)
* That said, when the PF is changing this value from 0xFFFFFFFF to
* something else, it might never take effect if the VF is running an
* inifinitely long compute or shader kernel. In such a scenario, the
* PF would need to trigger a VM PAUSE and then change the KLV to force
* it to take effect. Such cases might typically happen on a 1PF+1VF
* Virtualization config enabled for heavier workloads like AI/ML.
Typo: inifinitely, should be infinitely
Tha same for GUC_KLV_VF_CFG_PREEMPT_TIMEOUT
Thanks,
Piotr
> --
> 2.43.0
>
--
More information about the Intel-xe
mailing list