5544c1b
From 984e5c7aee378a8de44ff54891695115b92fe585 Mon Sep 17 00:00:00 2001
393f81b
From: Hans de Goede <hdegoede@redhat.com>
393f81b
Date: Fri, 7 Sep 2012 21:29:22 +0200
393f81b
Subject: [PATCH] qxl: Ignore set_client_capabilities pre/post migrate
393f81b
393f81b
The recent introduction of set_client_capabilities has broken
393f81b
(seamless) migration by trying to call qxl_send_events pre (seamless
393f81b
incoming) and post (*) migration, triggering the following assert:
393f81b
qxl_send_events: Assertion `qemu_spice_display_is_running(&d->ssd)' failed.
393f81b
393f81b
The solution is easy, pre migration the guest will have already received
393f81b
the client caps on the migration source side, and post migration there no
393f81b
longer is a guest, so we can simply ignore the set_client_capabilities call
393f81b
in both those scenarios.
393f81b
393f81b
*) Post migration, so not fatal for to the migration itself, but still a crash
393f81b
393f81b
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
393f81b
---
393f81b
 hw/qxl.c | 5 +++++
393f81b
 1 file changed, 5 insertions(+)
393f81b
393f81b
diff --git a/hw/qxl.c b/hw/qxl.c
5544c1b
index 2ec4341..360f4f6 100644
393f81b
--- a/hw/qxl.c
393f81b
+++ b/hw/qxl.c
5544c1b
@@ -955,6 +955,11 @@ static void interface_set_client_capabilities(QXLInstance *sin,
393f81b
 {
393f81b
     PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
393f81b
 
393f81b
+    if (runstate_check(RUN_STATE_INMIGRATE) ||
393f81b
+        runstate_check(RUN_STATE_POSTMIGRATE)) {
393f81b
+        return;
393f81b
+    }
393f81b
+
393f81b
     qxl->shadow_rom.client_present = client_present;
393f81b
     memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps));
393f81b
     qxl->rom->client_present = client_present;
393f81b
-- 
5544c1b
1.7.12.1
393f81b