[10/11] qxl: reset update_surface

Submitted by Gerd Hoffmann on Oct. 25, 2011, 12:25 p.m.


Message ID 1319545550-24203-11-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Oct. 25, 2011, 12:25 p.m.
From: Alon Levy <alevy@redhat.com>

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 <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
 hw/qxl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

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;