static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)

{

    dprint(d, 1, "%s: start%s\n", __FUNCTION__,

           loadvm ? " (loadvm)" : "");



    qemu_mutex_unlock_iothread();

    d->ssd.worker->reset_cursor(d->ssd.worker);

    d->ssd.worker->reset_image_cache(d->ssd.worker);

    qemu_mutex_lock_iothread();

    qxl_reset_surfaces(d);

    qxl_reset_memslots(d);



    /* pre loadvm reset must not touch QXLRam.  This lives in

     * device memory, is migrated together with RAM and thus

     * already loaded at this point */

    if (!loadvm) {

        qxl_reset_state(d);

    }

    qemu_spice_create_host_memslot(&d->ssd);

    qxl_soft_reset(d);



    dprint(d, 1, "%s: done\n", __FUNCTION__);

}

static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)

{

    dprint(d, 1, "%s: start%s\n", __FUNCTION__,

           loadvm ? " (loadvm)" : "");



    qemu_mutex_unlock_iothread();

    d->ssd.worker->reset_cursor(d->ssd.worker);

    d->ssd.worker->reset_image_cache(d->ssd.worker);

    qemu_mutex_lock_iothread();

    qxl_reset_surfaces(d);

    qxl_reset_memslots(d);



    





    if (!loadvm) {

        qxl_reset_state(d);

    }

    qemu_spice_create_host_memslot(&d->ssd);

    qxl_soft_reset(d);



    dprint(d, 1, "%s: done\n", __FUNCTION__);

}

    qemu_mutex_unlock_iothread();     qemu_mutex_lock_iothread();     qemu_mutex_unlock_iothread();     qemu_mutex_lock_iothread();     qemu_mutex_unlock_iothread();     qemu_mutex_lock_iothread();     qemu_mutex_unlock_iothread();     qemu_mutex_lock_iothread();     qemu_mutex_unlock_iothread();     qemu_mutex_lock_iothread();
static void FUNC_0(PCIQXLDevice *VAR_0, int VAR_1)

{

    dprint(VAR_0, 1, "%s: start%s\n", __FUNCTION__,

           VAR_1 ? " (VAR_1)" : "");



    qemu_mutex_unlock_iothread();

    VAR_0->ssd.worker->reset_cursor(VAR_0->ssd.worker);

    VAR_0->ssd.worker->reset_image_cache(VAR_0->ssd.worker);

    qemu_mutex_lock_iothread();

    qxl_reset_surfaces(VAR_0);

    qxl_reset_memslots(VAR_0);



    





    if (!VAR_1) {

        qxl_reset_state(VAR_0);

    }

    qemu_spice_create_host_memslot(&VAR_0->ssd);

    qxl_soft_reset(VAR_0);



    dprint(VAR_0, 1, "%s: done\n", __FUNCTION__);

}

static void FUNC_0(PCIQXLDevice *VAR_0, int VAR_1)
{ dprint(VAR_0, 1, "%s: start%s\n", __FUNCTION__,
VAR_1 ? " (VAR_1)" : ""); qemu_mutex_unlock_iothread(); VAR_0->ssd.worker->reset_cursor(VAR_0->ssd.worker); VAR_0->ssd.worker->reset_image_cache(VAR_0->ssd.worker); qemu_mutex_lock_iothread(); qxl_reset_surfaces(VAR_0); qxl_reset_memslots(VAR_0); if (!VAR_1) { qxl_reset_state(VAR_0); } qemu_spice_create_host_memslot(&VAR_0->ssd); qxl_soft_reset(VAR_0); dprint(VAR_0, 1, "%s: done\n", __FUNCTION__); }