From 6be092926feb5127f16a4304ef74f0838092e320 Mon Sep 17 00:00:00 2001
Message-Id: <6be092926feb5127f16a4304ef74f0838092e320.1350312451.git.minovotn@redhat.com>
In-Reply-To: <aa2da19f266f7dd7345db5620ee362446fc6e806.1350312451.git.minovotn@redhat.com>
References: <aa2da19f266f7dd7345db5620ee362446fc6e806.1350312451.git.minovotn@redhat.com>
From: Alon Levy <alevy@redhat.com>
Date: Sun, 7 Oct 2012 15:31:51 +0200
Subject: [PATCH 14/27] qxl: don't assert on guest create_guest_primary

RH-Author: Alon Levy <alevy@redhat.com>
Message-id: <1349623920-19894-8-git-send-email-alevy@redhat.com>
Patchwork-id: 42782
O-Subject: [PATCH RHEL-6.4 v2 07/16] qxl: don't assert on guest create_guest_primary
Bugzilla: 770842
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Arnon Gilboa <agilboa@redhat.com>

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Upstream: ddf9f4b707ca18adec4944a484caad1469c07c23
---
 hw/qxl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 hw/qxl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 22ce787..4515314 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1222,7 +1222,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);
-- 
1.7.11.7

