Messages in this thread | | | Subject | Re: [PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor | From | Rusty Russell <> | Date | Wed, 02 Aug 2006 17:20:05 +1000 |
| |
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/
| |