Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-23 Thread Marc-André Lureau
Hi On Mon, Jan 23, 2017 at 4:04 PM Gerd Hoffmann wrote: > Hi, > > > > If you only ref, you could have the image being modified while it is > > being saved asynchronously, this could result in tearing artefacts, > > no? > > Yes, but you have that problem _anyway_. screendump qmp command can ru

Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-23 Thread Gerd Hoffmann
Hi, > > If you only ref, you could have the image being modified while it is > being saved asynchronously, this could result in tearing artefacts, > no? Yes, but you have that problem _anyway_. screendump qmp command can run in parallel to guest vcpu, so it can race with guest display updates

Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-20 Thread Marc-André Lureau
Hi On Thu, Jan 19, 2017 at 12:21 PM Gerd Hoffmann wrote: > On Mi, 2017-01-18 at 20:03 +0400, Marc-André Lureau wrote: > > +surface = qemu_console_surface(con); > > + > > +/* FIXME: async save with coroutine? it would have to copy or > > lock > > + * the surface. */ > > +ppm_save(

Re: [Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-19 Thread Gerd Hoffmann
On Mi, 2017-01-18 at 20:03 +0400, Marc-André Lureau wrote: > +surface = qemu_console_surface(con); > + > +/* FIXME: async save with coroutine? it would have to copy or > lock > + * the surface. */ > +ppm_save(filename, surface, &err); > + No need to lock or copy. ppm_save() uses t

[Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-18 Thread Marc-André Lureau
Make screendump async to provide correct screendumps. HMP doesn't have async support, so it has to remain sync to avoid potential races. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1230527 Signed-off-by: Marc-André Lureau --- qapi-schema.json | 5 +++- include/ui/console.h | 1 +