qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv3] qxl: make sure primary surface is saved on migration
@ 2011-07-04 12:08 Yonit Halperin
  2011-07-04 13:19 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Yonit Halperin @ 2011-07-04 12:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: spice-devel, Yonit Halperin, kraxel

---
 hw/qxl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 2bb36c6..b3a3507 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1165,11 +1165,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);
     }
 }
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCHv3] qxl: make sure primary surface is saved on migration
  2011-07-04 12:08 [Qemu-devel] [PATCHv3] qxl: make sure primary surface is saved on migration Yonit Halperin
@ 2011-07-04 13:19 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-07-04 13:19 UTC (permalink / raw)
  To: Yonit Halperin; +Cc: spice-devel, qemu-devel

On 07/04/11 14:08, Yonit Halperin wrote:
> ---
>   hw/qxl.c |    9 ++++++---
>   1 files changed, 6 insertions(+), 3 deletions(-)
>

Added to spice patch queue.

thanks,
   Gerd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-04 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04 12:08 [Qemu-devel] [PATCHv3] qxl: make sure primary surface is saved on migration Yonit Halperin
2011-07-04 13:19 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).