Skip to contentSkip to conversation

fix stubdomain after DisplayState changes

PATCH Applied Stefano Stabellini 2 participants 2 messages Mar 13, 2009 – Mar 23, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix stubdomain after DisplayState changes

Hi all,
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.

---

hw/xenfb.c +1 -1
diff -r 4dc64c2e2dea hw/xenfb.c
@@ -741,7 +741,6 @@
             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 @@
                                        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;
xenfbfront.c +3 -1
diff -r 4dc64c2e2dea xenfbfront.c
@@ -279,9 +279,11 @@
         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;
 }
Applied
#1 lore raw

Stefano Stabellini writes ("[Xen-devel] [PATCH] fix stubdomain after DisplayState changes"):

Quoted 4 lines

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.

Applied to my tree ...

Ian.