From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgYg5-0003Pw-Ge for qemu-devel@nongnu.org; Tue, 12 Jul 2011 04:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgYg0-00031b-9v for qemu-devel@nongnu.org; Tue, 12 Jul 2011 04:50:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgYfz-00031E-Rf for qemu-devel@nongnu.org; Tue, 12 Jul 2011 04:50:44 -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 p6C8ofnG003172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Jul 2011 04:50:41 -0400 From: Yonit Halperin Date: Tue, 12 Jul 2011 11:51:58 +0300 Message-Id: <1310460718-19184-1-git-send-email-yhalperi@redhat.com> Subject: [Qemu-devel] [PATCH] 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: Yonit Halperin , alevy@redhat.com, kraxel@redhat.com 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 --- 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.4.4