[Spice-devel] [RfC PATCH 1/7] spice: add worker wrapper functions.

yhalperi yhalperi at redhat.com
Tue Jun 28 02:27:58 PDT 2011


On 06/22/2011 11:46 AM, Gerd Hoffmann wrote:

Hi,
> Add wrapper functions for all spice worker calls.
>
> Signed-off-by: Gerd Hoffmann<kraxel at redhat.com>
> ---
>   hw/qxl-render.c    |    4 +-
>   hw/qxl.c           |   32 +++++++++---------
>   ui/spice-display.c |   94 ++++++++++++++++++++++++++++++++++++++++++++++++---
>   ui/spice-display.h |   20 +++++++++++
>   4 files changed, 126 insertions(+), 24 deletions(-)
>

>
> @@ -799,7 +799,7 @@ static void qxl_reset_surfaces(PCIQXLDevice *d)
>   {
>       dprint(d, 1, "%s:\n", __FUNCTION__);
>       d->mode = QXL_MODE_UNDEFINED;
> -    d->ssd.worker->destroy_surfaces(d->ssd.worker);
> +    qemu_spice_destroy_surfaces(&d->ssd);
>       memset(&d->guest_surfaces.cmds, 0, sizeof(d->guest_surfaces.cmds));
>   }
>

zeroing the guest_surfaces should be moved to 
qemu_spice_destroy_surfaces. It is an older bug that it wasn't preformed 
on QXL_IO_DESTROY_ALL_SURFACES (which isn't actually called now, but 
once S3 support is committed, it will). The zeroing must be performed 
synchronically with worker->destroy_surfaces, since otherwise, 
asynchronous worker calls to interface_get_command might change the 
guest_surfaces again.
Also, not related to async io - the guest_surfaces.count should be 
zeroed too.

Cheers,
Yonit.





More information about the Spice-devel mailing list