diff -r 1f4b29eaf7f4 tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Thu Dec 20 17:30:27 2007 +0000 +++ b/tools/ioemu/hw/xenfb.c Thu Dec 27 13:30:33 2007 -0700 @@ -264,6 +264,9 @@ struct xenfb *xenfb_new(int domid, Displ xenfb->ds = ds; xenfb_device_set_domain(&xenfb->fb, domid); xenfb_device_set_domain(&xenfb->kbd, domid); + + /* Indicate we have the frame buffer resize feature */ + xenfb_xs_printf(xenfb->xsh, xenfb->fb.nodename, "feature-resize", "1"); fprintf(stderr, "FB: Waiting for KBD backend creation\n"); xenfb_wait_for_backend(&xenfb->kbd, xenfb_backend_created_kbd); @@ -510,6 +513,13 @@ static void xenfb_on_fb_event(struct xen } xenfb_guest_copy(xenfb, x, y, w, h); break; + case XENFB_TYPE_RESIZE: + w = event->resize.width; + h = event->resize.height; + xenfb->width = w; + xenfb->height = h; + dpy_resize(xenfb->ds, xenfb->width, xenfb->height); + break; } } mb(); /* ensure we're done with ring contents */ diff -r 1f4b29eaf7f4 xen/include/public/io/fbif.h --- a/xen/include/public/io/fbif.h Thu Dec 20 17:30:27 2007 +0000 +++ b/xen/include/public/io/fbif.h Fri Dec 28 03:45:02 2007 -0700 @@ -50,12 +50,26 @@ struct xenfb_update int32_t height; /* rect height */ }; +/* + * Framebuffer resize notification event + * Capable backend sets feature-resize in xenstore. + */ +#define XENFB_TYPE_RESIZE 3 + +struct xenfb_resize +{ + uint8_t type; /* XENFB_TYPE_RESIZE */ + int32_t width; /* xres */ + int32_t height; /* yres */ +}; + #define XENFB_OUT_EVENT_SIZE 40 union xenfb_out_event { uint8_t type; struct xenfb_update update; + struct xenfb_resize resize; char pad[XENFB_OUT_EVENT_SIZE]; }; @@ -111,8 +125,12 @@ struct xenfb_page * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and * sizeof(unsigned long) == 4, that's 4 Megs. Two directory * pages should be enough for a while. + * + * Increased to 3 to support 1280x1024 resolution on a 64bit system + * (1280*1024*4)/PAGE_SIZE = 1280 pages required + * PAGE_SIZE/64bit long = 512 pages per page directory */ - unsigned long pd[2]; + unsigned long pd[3]; }; /*