[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 17/20] console: make screendump asynchronous
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH v4 17/20] console: make screendump asynchronous |
Date: |
Tue, 30 Jul 2019 13:23:06 +0200 |
User-agent: |
NeoMutt/20180716 |
> > > + /*
> > > + * FIXME: async save with coroutine? it would have to copy or
> > > + * lock the surface.
> > > + */
> > > + ppm_save(dump->filename, surface, &err);
> >
> > DisplaySurface is just a thin layer above pixman images these days.
> > Pixman images are reference counted, so you can
> > pixman_image_ref(surface->image) to make sure it doesn't disappear
> > underneath you, then pass the pixman image to ppm_save.
>
> ppm_save() is still synchronous. I suppose you suggested that for a
> future async version.
Yes.
> (note that in this case, ref the surface is
> probably not sufficient, as it could be mutated while it is being
> saved)
That can happen anyway. The display surface / pixman image can be backed
by guest-writable memory (stdvga vram for example) and even when holding
the qemu lock the guest vcpu can write there ...
cheers,
GerdY