[PATCH v6 8/9] drm/xe/vf: Refresh utilization buffer during migration recovery

Lis, Tomasz tomasz.lis at intel.com
Sat Jul 19 05:18:19 UTC 2025


On 16.07.2025 20:54, Michał Winiarski wrote:
> On Fri, Jul 04, 2025 at 11:02:27PM +0200, Tomasz Lis wrote:
>> The WA buffer we use to capture context utilization contains GGTT
>> references. This means its instructions have to be either fixed or
>> re-emitted during VF post-migration recovery.
>>
>> This patch adds re-emitting content of the utilization WA BB during
>> the recovery.
>>
>> The way we write to vram requires scratch buffer to be used before
>> the whole block is memcopied. We are re-using a scratch buffer
>> introduced in earlier part of the recovery.
>>
>> v2: Notable rebase after "Prepare WA BB setup for more users" patch
>>
>> Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Needs to be rebased onto current drm-tip (and the tmp buffer allocation
> should probably be shifted down the stack).
> But still:

Will leave the `kalloc()` at higher level. Unless we find another way to 
handle locking,

we cannot allow `kalloc()` while fixups are being applied.

It's not pretty, but that is the consequence of the decision to use temp 
buffer every

time we emit something.

-Tomasz

> Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
>
> Thanks,
> -Michał
>
>> ---
>>   drivers/gpu/drm/xe/xe_exec_queue.c |  1 +
>>   drivers/gpu/drm/xe/xe_lrc.c        | 54 ++++++++++++++++++++----------
>>   drivers/gpu/drm/xe/xe_lrc.h        |  4 +++
>>   drivers/gpu/drm/xe/xe_sriov_vf.c   |  2 +-
>>   4 files changed, 42 insertions(+), 19 deletions(-)


More information about the Intel-xe mailing list