[PATCH 1/2] drm/xe/vf: Don't support changing GuC reset policy
Laguna, Lukasz
lukasz.laguna at intel.com
Thu Apr 3 15:06:03 UTC 2025
On 4/3/2025 12:56, Michal Wajdeczko wrote:
>
> On 03.04.2025 11:41, Lukasz Laguna wrote:
>> VF can't change GuC reset policy. Ensure the driver does not attempt to
>> do so by adding an assertion.
> none of xe_guc_ads() functions are applicable for the VFs by definition,
> since GuC ADS is purely a PF/native responsibility
>
> why do we want to assert just one of these function?
>
> it should either fail (due to use of the privileged H2G action) or crash
> (due to use of previously uninitialized structures)
>
> I'm not sure that we want to annotate/pollute all privileged parts of
> the driver with !IS_SRIOV_VF asserts
Makes sense. I'll drop this patch.
>
>> Signed-off-by: Lukasz Laguna <lukasz.laguna at intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_guc_ads.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
>> index bee4e0cfe7b8..2ea07d28728e 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
>> @@ -990,6 +990,8 @@ int xe_guc_ads_scheduler_policy_toggle_reset(struct xe_guc_ads *ads)
>> struct xe_bo *bo;
>> int ret = 0;
>>
>> + xe_gt_assert(gt, !IS_SRIOV_VF(gt_to_xe(gt)));
>> +
>> policies = kmalloc(sizeof(*policies), GFP_KERNEL);
>> if (!policies)
>> return -ENOMEM;
More information about the Intel-xe
mailing list