Skip to contentSkip to conversation

qxl: reset update_surface

PATCH In review Alon Levy 2 participants 2 messages Oct 23, 2011 – Oct 24, 2011

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

PATCH 1/1 qxl: reset update_surface

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

---
 hw/qxl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/qxl.c +1 -0
index 03848ed..632658d 100644
@@ -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);
Signature · 1 line
1.7.6.4
#1 lore raw
Quoted 6 lines · 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.

Patch added to spice patch queue.

thanks,
Gerd