qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yonit Halperin <yhalperi@redhat.com>
To: qemu-devel@nongnu.org, spice-devel@freedesktop.org
Cc: Yonit Halperin <yhalperi@redhat.com>, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH] qxl: make sure primary surface is saved on migration also in compat mode
Date: Tue, 14 Feb 2012 10:10:18 +0200	[thread overview]
Message-ID: <1329207018-7542-1-git-send-email-yhalperi@redhat.com> (raw)

RHBZ #790083

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
---
 hw/qxl.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index bc03c1d..a2a3380 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1478,14 +1478,21 @@ static void qxl_vm_change_state_handler(void *opaque, int running,
          * called
          */
          qxl_update_irq(qxl);
-    } else if (qxl->mode == QXL_MODE_NATIVE) {
-        /* dirty all vram (which holds surfaces) and devram (primary surface)
+    } else {
+        /* dirty all vram (which holds surfaces) and the 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 */
-        qxl_set_dirty(&qxl->vram_bar, 0, qxl->vram_size);
-        qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
-                      qxl->shadow_rom.surface0_area_size);
+        switch (qxl->mode) {
+        case QXL_MODE_NATIVE:
+            qxl_set_dirty(&qxl->vram_bar, 0, qxl->vram_size);
+        case QXL_MODE_COMPAT:
+            qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
+                          qxl->shadow_rom.surface0_area_size);
+            break;
+        default:
+            break;
+        }
     }
 }
 
-- 
1.7.7.6

             reply	other threads:[~2012-02-14  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  8:10 Yonit Halperin [this message]
2012-02-14  8:35 ` [Qemu-devel] [PATCH] qxl: make sure primary surface is saved on migration also in compat mode Gerd Hoffmann
2012-02-14  9:10   ` Yonit Halperin
2012-02-14  9:15     ` [Qemu-devel] [Spice-devel] " Yonit Halperin
2012-02-14  9:24     ` [Qemu-devel] " Gerd Hoffmann
2012-02-14  9:33       ` Yonit Halperin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329207018-7542-1-git-send-email-yhalperi@redhat.com \
    --to=yhalperi@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=spice-devel@freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).