[PATCH 0/4] drm/xe: Implement device shutdown to make kexec work.
Aravind Iddamsetty
aravind.iddamsetty at linux.intel.com
Mon Sep 9 05:42:40 UTC 2024
On 06/09/24 21:23, Rodrigo Vivi wrote:
> On Fri, Sep 06, 2024 at 11:52:43AM +0200, Maarten Lankhorst wrote:
>>
>> Den 2024-09-05 kl. 19:34, skrev Jani Nikula:
>>> On Thu, 05 Sep 2024, Maarten Lankhorst <maarten.lankhorst at linux.intel.com> wrote:
>>>> Testcase:
>>>> kexec --reuse-cmdline --initrd=initrd.img -f vmlinuz
>>>>
>>>> Because we don't shut down xe correctly, we cannot reload xe afterwards.
>>>> Implement device shutdown by performing a FLR, then we can load the device
>>>> cleanly again afterwards.
>>> Maybe a silly question, but what's FLR?
>> Function level reset. It resets all the resources on the device, so display, all gt's etc are all turned off.
>> It's far faster than resetting each component separately. And it even works if display is the cause off a panic
>> since no locks are qrequired.
> Just to avoid confusion, I like to call this one as driver-initiated-FLR.
> It is a feature introduced back in gen11, I believe, where the driver can use
> MMIO to request the reset of many IP blocks including GT, SGUnit, Display, etc.
>
> But it is not the same as the full PCI Function Level Reset as some components
> won't get reset nor have the memory wiped out.
>
> The only way to get the PCI FLR is doing echo 1 to device/reset:
> echo 1 /sys/class/drm/card1/device/reset
>
> On my scripts when I want a full clean start I have something like this:
>
> echo -n "0000:00:02.0" | sudo tee /sys/bus/pci/drivers/i915/unbind
> echo -n 1 | sudo tee /sys/bus/pci/devices/0000\:00\:02.0/reset
> echo -n "0000:00:02.0" | sudo tee /sys/bus/pci/drivers/i915/bind
>
> Hopefully on Xe will be able to support the echo 1 > device/reset
> without having to unbind and reprobe:
>
> https://lore.kernel.org/intel-xe/20240422065756.294679-1-aravind.iddamsetty@linux.intel.com/
>
> Cc: Aravind Iddamsetty <aravind.iddamsetty at linux.intel.com>
will plan to revise it soon.
Thanks,
Aravind.
>
>> Cheers,
>> ~Maarten
More information about the Intel-xe
mailing list