lkml.org 
[lkml]   [2006]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor
From
Date
On Wed, 2006-08-02 at 00:01 -0700, Chris Wright wrote:
> Here's an updated patch. Rather than use __FIXADDR_TOP to adjust for
> MAXMEM, directly update __VMALLOC_RESERVE which is used to reserve the
> space for vmalloc, iomap, and fixmap (as comments aptly point out). I
> tested this with a bunch of configurations, and booted a XenoLinux
> kernel with this patch as well.

Just one minor point:

> +void set_fixaddr_top(unsigned long top)
> +{
> + BUG_ON(fixmaps > 0);
> +#ifdef CONFIG_COMPAT_VDSO
> + BUG_ON(top - PAGE_SIZE != __FIXADDR_TOP);
> +#else
> + __FIXADDR_TOP = top - PAGE_SIZE;
> + __VMALLOC_RESERVE -= top;
> +#endif
> }

This no longer seems to be an appropriate name. How about
set_address_top_reserve or something?

void set_address_top_reserve(unsigned long reserve)
{
BUG_ON(fixmaps > 0);
#ifdef CONFIG_COMPAT_VDSO
BUG_ON(reserve != 0);
#else
__FIXADDR_TOP = -reserve - PAGE_SIZE;
__VMALLOC_RESERVE += reserve;
#endif
}

(I *think* I got the logic here correct).

Rusty.
--
Help! Save Australia from the worst of the DMCA: http://linux.org.au/law

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-02 09:23    [W:0.107 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site