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

393f81
From 68d246d6a904e0a851c521a08a18187598e1c696 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
393f81
index 045432e..1b400f1 100644
393f81
--- a/hw/qxl.c
393f81
+++ b/hw/qxl.c
393f81
@@ -953,6 +953,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
-- 
393f81
1.7.12
393f81