Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-30 Thread Kim, Dongwon
Hi, On 6/30/2023 12:14 AM, Chen, Jiqian wrote: Hi Dongwon, On 2023/6/30 00:53, Kim, Dongwon wrote: This method - letting QEMU not remove resources would work on S3 case but with S4, the QEMU would lose all the resources anyway as the process will be terminated. So objects restoring was only

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-30 Thread Chen, Jiqian
Hi Dongwon, On 2023/6/30 00:53, Kim, Dongwon wrote: > This method - letting QEMU not remove resources would work on S3 case but > with S4, the QEMU would lose all the resources anyway as the process will be > terminated. So objects restoring was only option for us as My patch is for S3 function

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-29 Thread Kim, Dongwon
This method - letting QEMU not remove resources would work on S3 case but with S4, the QEMU would lose all the resources anyway as the process will be terminated. So objects restoring was only option for us as in [RFC PATCH 2/2] drm/virtio: restore virtio_gpu_objects upon suspend and resume

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-29 Thread Kim, Dongwon
On 6/21/2023 4:14 AM, Robert Beckett wrote: On 21/06/2023 09:39, Gerd Hoffmann wrote: On Tue, Jun 20, 2023 at 01:26:15PM +0100, 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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-21 Thread Gerd Hoffmann
Hi, > As virtio drivers are by design paravirt drivers ,I think it is reasonable > to accept some knowledge with and cooperation with the host to manage > suspend/resume. Fair point. In any case this needs a feature flag, so guest and host can negotiate whenever this is supported or not.

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-21 Thread Robert Beckett
On 21/06/2023 09:39, Gerd Hoffmann wrote: On Tue, Jun 20, 2023 at 01:26:15PM +0100, 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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-21 Thread Gerd Hoffmann
On Tue, Jun 20, 2023 at 01:26:15PM +0100, 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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Kim, Dongwon
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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Robert Beckett
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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Gerd Hoffmann
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

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Chen, Jiqian
Hi Gerd Hoffmann On 2023/6/19 20:51, Gerd Hoffmann wrote: > Hi, >> Adding a new command requires new feature flag (and maybe it should be in >> the <0x1000 range instead) >> >> But I am not sure we need a new message at the virtio-gpu level. Gerd, wdyt? >> >> Maybe it's not a good place to

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-19 Thread Gerd Hoffmann
Hi, > Adding a new command requires new feature flag (and maybe it should be in > the <0x1000 range instead) > > But I am not sure we need a new message at the virtio-gpu level. Gerd, wdyt? > > Maybe it's not a good place to reset all GPU resources during QEMU reset() > after all, if it's

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-15 Thread Chen, Jiqian
On 2023/6/9 00:41, Robert Beckett wrote: > > On 08/06/2023 03:56, Jiqian Chen wrote: >> After suspending and resuming guest VM, you will get >> a black screen, and the display can't come back. >> >> This is because when guest did suspending, it called >> into qemu to call virtio_gpu_gl_reset. In

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-15 Thread Chen, Jiqian
Hi Marc-André Lureau On 2023/6/12 20:42, Marc-André Lureau wrote: > Hi > > On Thu, Jun 8, 2023 at 6:26 AM Jiqian Chen > wrote: > > After suspending and resuming guest VM, you will get > a black screen, and the display can't come back. > > This is

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-12 Thread Marc-André Lureau
Hi On Thu, Jun 8, 2023 at 6:26 AM Jiqian Chen wrote: > After suspending and resuming guest VM, you will get > a black screen, and the display can't come back. > > This is because when guest did suspending, it called > into qemu to call virtio_gpu_gl_reset. In function > virtio_gpu_gl_reset, it

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-08 Thread Chen, Jiqian
On 2023/6/9 00:41, Robert Beckett wrote: > > On 08/06/2023 03:56, Jiqian Chen wrote: >> After suspending and resuming guest VM, you will get >> a black screen, and the display can't come back. >> >> This is because when guest did suspending, it called >> into qemu to call virtio_gpu_gl_reset. In

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-08 Thread Robert Beckett
On 08/06/2023 03:56, Jiqian Chen wrote: After suspending and resuming guest VM, you will get a black screen, and the display can't come back. This is because when guest did suspending, it called into qemu to call virtio_gpu_gl_reset. In function virtio_gpu_gl_reset, it destroyed resources and

[QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-07 Thread Jiqian Chen
After suspending and resuming guest VM, you will get a black screen, and the display can't come back. This is because when guest did suspending, it called into qemu to call virtio_gpu_gl_reset. In function virtio_gpu_gl_reset, it destroyed resources and reset renderer, which were used for