From patchwork Fri Sep 7 19:48:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 182438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5DEE52C009D for ; Sat, 8 Sep 2012 05:47:24 +1000 (EST) Received: from localhost ([::1]:50491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA4WQ-000327-Dm for incoming@patchwork.ozlabs.org; Fri, 07 Sep 2012 15:47:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA4WJ-00031v-JD for qemu-devel@nongnu.org; Fri, 07 Sep 2012 15:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TA4WI-0002Fu-Ly for qemu-devel@nongnu.org; Fri, 07 Sep 2012 15:47:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA4WI-0002Fq-DL for qemu-devel@nongnu.org; Fri, 07 Sep 2012 15:47:14 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q87JlDib001980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Sep 2012 15:47:13 -0400 Received: from shalem.localdomain.com (vpn1-4-200.ams2.redhat.com [10.36.4.200]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q87JlBUU006176; Fri, 7 Sep 2012 15:47:11 -0400 From: Hans de Goede To: Gerd Hoffmann Date: Fri, 7 Sep 2012 21:48:22 +0200 Message-Id: <1347047302-8133-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Hans de Goede , =?UTF-8?q?S=C3=B8ren=20Sandmann?= , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] qxl: Ignore set_client_capabilities pre/post migrate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The recent introduction of set_client_capabilities has broken (seamless) migration by trying to call qxl_send_events pre (seamless incoming) and post (*) migration, triggering the following assert: qxl_send_events: Assertion `qemu_spice_display_is_running(&d->ssd)' failed. The solution is easy, pre migration the guest will have already received the client caps on the migration source side, and post migration there no longer is a guest, so we can simply ignore the set_client_capabilities call in both those scenarios. *) Post migration, so not fatal for to the migration itself, but still a crash Signed-off-by: Hans de Goede --- hw/qxl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/qxl.c b/hw/qxl.c index 045432e..1b400f1 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -953,6 +953,11 @@ static void interface_set_client_capabilities(QXLInstance *sin, { PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl); + if (runstate_check(RUN_STATE_INMIGRATE) || + runstate_check(RUN_STATE_POSTMIGRATE)) { + return; + } + qxl->shadow_rom.client_present = client_present; memcpy(qxl->shadow_rom.client_capabilities, caps, sizeof(caps)); qxl->rom->client_present = client_present;