Patchwork [v2] qxl: don't assert on guest create_guest_primary

login
register
mail settings
Submitter Alon Levy
Date April 25, 2012, 9:43 a.m.
Message ID <1335347011-10391-1-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/154853/
State New
Headers show

Comments

Alon Levy - April 25, 2012, 9:43 a.m.
Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/qxl.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index c614c91..6c11e70 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1191,7 +1191,10 @@  static void qxl_create_guest_primary(PCIQXLDevice *qxl, int loadvm,
     QXLDevSurfaceCreate surface;
     QXLSurfaceCreate *sc = &qxl->guest_primary.surface;
 
-    assert(qxl->mode != QXL_MODE_NATIVE);
+    if (qxl->mode == QXL_MODE_NATIVE) {
+        qxl_guest_bug(qxl, "%s: nop since already in QXL_MODE_NATIVE",
+                      __func__);
+    }
     qxl_exit_vga_mode(qxl);
 
     surface.format     = le32_to_cpu(sc->format);