From: Yonit Halperin Date: Mon, 4 Jul 2011 12:08:01 +0000 (+0300) Subject: qxl: make sure primary surface is saved on migration X-Git-Tag: TizenStudio_2.0_p2.3~2579^2~28^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d03a27ac102976c65d04f3b943826a929507da3;p=sdk%2Femulator%2Fqemu.git qxl: make sure primary surface is saved on migration Signed-off-by: Gerd Hoffmann --- diff --git a/hw/qxl.c b/hw/qxl.c index d55b68d..5e49536 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1184,11 +1184,14 @@ static void qxl_vm_change_state_handler(void *opaque, int running, int reason) qemu_spice_vm_change_state_handler(&qxl->ssd, running, reason); if (!running && qxl->mode == QXL_MODE_NATIVE) { - /* dirty all vram (which holds surfaces) to make sure it is saved */ + /* dirty all vram (which holds surfaces) and devram (primary surface) + * to make sure they are saved */ /* FIXME #1: should go out during "live" stage */ /* FIXME #2: we only need to save the areas which are actually used */ - ram_addr_t addr = qxl->vram_offset; - qxl_set_dirty(addr, addr + qxl->vram_size); + ram_addr_t vram_addr = qxl->vram_offset; + ram_addr_t surface0_addr = qxl->vga.vram_offset + qxl->shadow_rom.draw_area_offset; + qxl_set_dirty(vram_addr, vram_addr + qxl->vram_size); + qxl_set_dirty(surface0_addr, surface0_addr + qxl->shadow_rom.surface0_area_size); } }