initiate the implicit destroy ourselves. Signed-off-by: Alon Levy <al...@redhat.com> --- 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