On 4/19/25 02:29, dongwon....@intel.com wrote: > From: Dongwon Kim <dongwon....@intel.com> > > This patch series introduces a freeze and restore mechanism for > the virtio-gpu driver: > > First patch adds `virtgpu_freeze` and `virtgpu_restore` functions. > These functions handle the deletion of virtio queues before suspension and > their recreation during the restoration process. > > Second patch implements a mechanism for restoring `virtio_gpu_object` > instances. > This is necessary because the host (QEMU) deletes all associated resources > during > the virtio-gpu reset, which occurs as part of the restoration process. > > These changes ensure that the virtio-gpu driver can properly handle suspend > and > resume scenarios without resource loss.
Resetting GPU by QEMU on suspend sounds like a wrong behaviour. Are you talking about upstream QEMU? Could you please point at the QEMU code where it handles virtio-gpu suspend/resume? Don't see where it happens. I tried to apply your kernel patches and then suspend/resume guest kernel, it doesn't work: virtio_gpu_transfer_to_host_2d: no backing storage 2 [ 22.909454] [drm:virtio_gpu_dequeue_ctrl_func] *ERROR* response 0x1200 (command 0x105) virtio_gpu_transfer_to_host_2d: no backing storage 2 [ 23.169138] [drm:virtio_gpu_dequeue_ctrl_func] *ERROR* response 0x1200 (command 0x105) Cc: +Alex Bennée +Akihiko Odaki -- Best regards, Dmitry