From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] fix stubdomain after DisplayState changes
Date: Fri, 13 Mar 2009 18:24:32 +0000 [thread overview]
Message-ID: <49BAA4E0.7000903@eu.citrix.com> (raw)
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.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
diff -r 4dc64c2e2dea hw/xenfb.c
--- a/hw/xenfb.c Fri Mar 13 12:20:50 2009 +0000
+++ b/hw/xenfb.c Fri Mar 13 18:15:35 2009 +0000
@@ -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;
diff -r 4dc64c2e2dea xenfbfront.c
--- a/xenfbfront.c Fri Mar 13 12:20:50 2009 +0000
+++ b/xenfbfront.c Fri Mar 13 18:15:35 2009 +0000
@@ -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;
}
next reply other threads:[~2009-03-13 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 18:24 Stefano Stabellini [this message]
2009-03-23 17:15 ` [PATCH] fix stubdomain after DisplayState changes Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49BAA4E0.7000903@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.