From patchwork Sun Oct 23 15:03:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 121235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E9EF3B6F8E for ; Mon, 24 Oct 2011 02:06:53 +1100 (EST) Received: from localhost ([::1]:47983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHzdL-0001sW-2r for incoming@patchwork.ozlabs.org; Sun, 23 Oct 2011 11:06:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHzdF-0001sP-Kq for qemu-devel@nongnu.org; Sun, 23 Oct 2011 11:06:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHzdE-0002ZZ-R7 for qemu-devel@nongnu.org; Sun, 23 Oct 2011 11:06:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHzdE-0002ZV-KC for qemu-devel@nongnu.org; Sun, 23 Oct 2011 11:06:36 -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 p9NF6Z03018588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 23 Oct 2011 11:06:36 -0400 Received: from bow.tlv.redhat.com (dhcp-3-73.tlv.redhat.com [10.35.3.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9NF6XnS003238; Sun, 23 Oct 2011 11:06:34 -0400 From: Alon Levy To: kraxel@redhat.com Date: Sun, 23 Oct 2011 17:03:52 +0200 Message-Id: <1319382232-23392-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] qxl: reset update_surface 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 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 --- hw/qxl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 03848ed..632658d 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -330,6 +330,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);