From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhHKV-0001wt-TS for qemu-devel@nongnu.org; Thu, 14 Jul 2011 04:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhHKU-0000BT-68 for qemu-devel@nongnu.org; Thu, 14 Jul 2011 04:31:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhHKT-0000BH-LP for qemu-devel@nongnu.org; Thu, 14 Jul 2011 04:31:29 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6E8VRdw019857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Jul 2011 04:31:27 -0400 Message-ID: <4E1EA95C.5040002@redhat.com> Date: Thu, 14 Jul 2011 10:31:24 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1310460718-19184-1-git-send-email-yhalperi@redhat.com> In-Reply-To: <1310460718-19184-1-git-send-email-yhalperi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Yonit Halperin Cc: alevy@redhat.com, qemu-devel@nongnu.org On 07/12/11 10:51, Yonit Halperin wrote: > 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); Patch added to spice patch queue. thanks, Gerd