[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qxl: don't assert on guest create_guest_primary
From: |
Alon Levy |
Subject: |
[Qemu-devel] [PATCH] qxl: don't assert on guest create_guest_primary |
Date: |
Wed, 18 Apr 2012 14:00:06 +0300 |
initiate the implicit destroy ourselves.
Signed-off-by: Alon Levy <address@hidden>
---
hw/qxl.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 6776a7f..1ab3348 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1163,7 +1163,15 @@ 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) {
+ /*
+ * allow a create without a destroy. This could be used
+ * later for an atomic "change primary" but right now just
+ * destroy the primary for the guest. Note that this uses
+ * the ability to have multiple concurrent async commands.
+ */
+ qxl_destroy_primary(qxl, async);
+ }
qxl_exit_vga_mode(qxl);
surface.format = le32_to_cpu(sc->format);
--
1.7.10
- [Qemu-devel] [PATCH] qxl: don't assert on guest create_guest_primary,
Alon Levy <=