Received: from eggs.gnu.org ([140.186.70.92]:38900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgZb-0002NO-5e for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:57:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIgNh-0004M3-Nc for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgNh-0004Lw-DV for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:25 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9PCjOxD001967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Oct 2011 08:45:24 -0400 From: Gerd Hoffmann Date: Tue, 25 Oct 2011 14:25:49 +0200 Message-Id: <1319545550-24203-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1319545550-24203-1-git-send-email-kraxel@redhat.com> References: <1319545550-24203-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 10/11] qxl: reset update_surface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alon Levy , Gerd Hoffmann From: Alon Levy update init_qxl_ram to reset update_surface to 0. This fixes one case of breakage when installing an old driver in a vm that had a new driver installed. The newer driver would know about surface creation and would change update_surface to !=0, then a reset would happen, all surfaces are destroyed, then the old driver is initialized and issues an UPDATE_AREA, and spice server aborts on invalid surface. RHBZ: 690427 Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 3a3b3a4..12f71aa 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -331,6 +331,7 @@ static void init_qxl_ram(PCIQXLDevice *d) d->ram->magic = cpu_to_le32(QXL_RAM_MAGIC); d->ram->int_pending = cpu_to_le32(0); d->ram->int_mask = cpu_to_le32(0); + d->ram->update_surface = 0; SPICE_RING_INIT(&d->ram->cmd_ring); SPICE_RING_INIT(&d->ram->cursor_ring); SPICE_RING_INIT(&d->ram->release_ring); -- 1.7.1