From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: 32-on-64: pvfb issue Date: Fri, 19 Jan 2007 12:43:15 +0100 Message-ID: <45B0AED3.2020503@suse.de> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020000090905090707040506" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Xen devel list , Markus Armbruster List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------020000090905090707040506 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Keir Fraser wrote: > > > On 19/1/07 09:54, "Gerd Hoffmann" wrote: > >>> Make tools >>> write a default value for pv guests for backward compat. >> Here is a one-line fix to make the pvfb frontend clear the shared page. >> Can this go into both 3.0.4 and unstable please? > > How about a patch to clear the page *and* write a newly-defined protocol > field? Or are you still planning to kludge the bitwidth check in the > backend? That is better, yes. Minimum patch attached. For unstable I'll brew a nicer version with defines and so on when adjusting the backend code to be able to deal with both protocols. cheers, Gerd -- Gerd Hoffmann --------------020000090905090707040506 Content-Type: text/x-patch; name="fbif-bimodal.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fbif-bimodal.diff" --- linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c | 8 +++++++- xen/include/public/io/fbif.h | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) Index: build-32-unstable-13495/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c =================================================================== --- build-32-unstable-13495.orig/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c +++ build-32-unstable-13495/linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c @@ -479,7 +479,7 @@ static int __devinit xenfb_probe(struct goto error_nomem; /* set up shared page */ - info->page = (void *)__get_free_page(GFP_KERNEL); + info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO); if (!info->page) goto error_nomem; @@ -600,6 +600,12 @@ static void xenfb_init_shared_page(struc for (i = 0; i < info->nr_pages; i++) info->mfns[i] = vmalloc_to_mfn(info->fb + i * PAGE_SIZE); +#if defined(__i386__) + info->page->protocol = 1; +#elif defined(__x86_64__) || defined(__ia64__) + info->page->protocol = 2; +#endif + info->page->pd[0] = vmalloc_to_mfn(info->mfns); info->page->pd[1] = 0; info->page->width = XENFB_WIDTH; Index: build-32-unstable-13495/xen/include/public/io/fbif.h =================================================================== --- build-32-unstable-13495.orig/xen/include/public/io/fbif.h +++ build-32-unstable-13495/xen/include/public/io/fbif.h @@ -102,6 +102,11 @@ struct xenfb_page uint32_t line_length; /* the length of a row of pixels (in bytes) */ uint32_t mem_length; /* the length of the framebuffer (in bytes) */ uint8_t depth; /* the depth of a pixel (in bits) */ + uint8_t protocol; /* protocol version + * 1 -- page directory: i386 + * 2 -- page directory: x86_64, ia64 + * 3 -- grant tables [not yet] + */ /* * Framebuffer page directory --------------020000090905090707040506 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------020000090905090707040506--