Blame 0508-qxl-Ignore-set_client_capabilities-pre-post-migrate.patch

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