]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
fix stubdomain after DisplayState changes
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Mar 2009 17:15:12 +0000 (17:15 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Mar 2009 17:15:12 +0000 (17:15 +0000)
this patch fixes few stubdom issues arised after the recent DisplayState
changes (not yet pushed to qemu-xen-unstable).
The main problem is that we need to touch the newly allocated pages
before sharing them, because minios allocates on first write.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xenfb.c
xenfbfront.c

index a0319eb5912232a383a86f137398a3c6a634441b..31bc8f3d9c48463a559448c8040afdb280d702d1 100644 (file)
@@ -741,7 +741,6 @@ static void xenfb_update(void *opaque)
             xenfb->c.ds->surface = qemu_create_displaysurface_from
                 (xenfb->width, xenfb->height, xenfb->depth,
                  xenfb->row_stride, xenfb->pixels + xenfb->offset);
-            dpy_resize(xenfb->c.ds);
             break;
         default:
             /* we must convert stuff */
@@ -750,6 +749,7 @@ static void xenfb_update(void *opaque)
                                        xenfb->depth, xenfb->row_stride);
             break;
         }
+        dpy_resize(xenfb->c.ds);
         xen_be_printf(&xenfb->c.xendev, 1, "update: resizing: %dx%d\n",
                       xenfb->width, xenfb->height);
         xenfb->up_fullscreen = 1;
index af8e0ae5393994050880279ad7c33371100e51c5..254458d4f9d296983a770ba12f4e14fdd5d3cebc 100644 (file)
@@ -279,9 +279,11 @@ static void xenfb_pv_display_allocator(void)
         fprintf(stderr, "xenfb_pv_display_allocator: could not allocate nonshared_vram\n");
         exit(1);
     }
+    /* Touch the pages before sharing them */
+    memset(xs->nonshared_vram, 0xff, vga_ram_size);
 
     ds = xenfb_create_displaysurface(ds_get_width(xs->ds), ds_get_height(xs->ds), ds_get_bits_per_pixel(xs->ds), ds_get_linesize(xs->ds));
-    qemu_free_displaysurface(xs->ds);
+    defaultallocator_free_displaysurface(xs->ds->surface);
     xs->ds->surface = ds;
 }