[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend
Hello,I just came across this discussion regarding s3/s4 support in virtio-gpu driver and QEMU. We saw similar problem a while ago (QEMU deletes all objects upon suspension) and came up with an experimental solution that is basically making virtio-gpu driver to do object creation for all existing resources once VM is resumed so that he QEMU recreate them.This method has worked pretty well on our case. I submitted patches for this to dri-devel a while ago. [RFC PATCH 0/2] drm/virtio:virtio-gpu driver freeze-and-restore implementation (lists.freedesktop.org) <https://lists.freedesktop.org/archives/dri-devel/2022-September/373892.html> This is kernel driver only solution. Nothing has to be changed in QEMU.Jiqian and other reviewers, can you check this old solution we suggested as well? On 6/20/2023 5:26 AM, Robert Beckett wrote: On 20/06/2023 10:41, Gerd Hoffmann wrote:Hi,The guest driver should be able to restore resources after resume.Thank you for your suggestion!As far as I know, resources are created on host side and guest has no backup, if resources are destroyed, guest can't restore them. Or do you mean guest driver need to send commands to re-create resources after resume?The later. The guest driver knows which resources it has created, it can restore them after suspend.Are you sure that this is viable?How would you propose that a guest kernel could reproduce a resource, including pixel data upload during a resume?The kernel would not have any of the pixel data to transfer to host. This is normally achieved by guest apps calling GL calls and mesa asking the kernel to create the textures with the given data (often read from a file). If your suggestion is to get the userland application to do it, that would entirely break how suspend/resume is meant to happen. It should be transparent to userland applications for the most part.Could you explain how you anticipate the guest being able to reproduce the resources please?If so, I have some questions. Can guest re-create resources by using object(virtio_vpu_object) or others? Can the new resources replace the destroyed resources to continue the suspended display tasks after resume?Any display scanout information will be gone too, the guest driver needs re-create this too (after re-creating the resources). take care, Gerd
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |