From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjTyU-0001O9-OJ for qemu-devel@nongnu.org; Wed, 20 Jul 2011 06:25:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjTyS-0004Qv-UV for qemu-devel@nongnu.org; Wed, 20 Jul 2011 06:25:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjTyS-0004Qj-Aa for qemu-devel@nongnu.org; Wed, 20 Jul 2011 06:25:52 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6KAPpOa026969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Jul 2011 06:25:51 -0400 From: Gerd Hoffmann Date: Wed, 20 Jul 2011 12:25:38 +0200 Message-Id: <1311157538-12753-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1311157538-12753-1-git-send-email-kraxel@redhat.com> References: <1311157538-12753-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] qxl: upon reset, if spice worker is stopped, the command rings can be not empty List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alon Levy , Yonit Halperin , Gerd Hoffmann From: Yonit Halperin Spice worker does no longer process commands when it is stopped. Otherwise, it might crash during migration when attempting to process commands while the guest is not completely loaded. Cc: Alon Levy Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 0b9a4c7..a6fb7f0 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -656,8 +656,8 @@ static void qxl_reset_state(PCIQXLDevice *d) QXLRam *ram = d->ram; QXLRom *rom = d->rom; - assert(SPICE_RING_IS_EMPTY(&ram->cmd_ring)); - assert(SPICE_RING_IS_EMPTY(&ram->cursor_ring)); + assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cmd_ring)); + assert(!d->ssd.running || SPICE_RING_IS_EMPTY(&ram->cursor_ring)); d->shadow_rom.update_id = cpu_to_le32(0); *rom = d->shadow_rom; qxl_rom_set_dirty(d); -- 1.7.1