On Tue, 2006-07-25 at 19:26 +0100, Christian Limpach wrote: > On 25/7/06 07:06, "Zachary Amsden" <zach at vmware.com> wrote: > > > 1) Init code fills in pv_ops struct > > 2) Linux does a bunch of stuff - now about to set up pagetables on BSP > > 3) set_fixaddr_top(pv_ops->get_linear_top()) (once only, in > > arch/i386/mm/init.c) > > I think this is the best proposal so far, since it removes how having a way > to control where the VA space ends and having fixaddrs (at all, at the end > of VA space) would be tied together otherwise. And it leaves the code more > readable with the set_fixaddr_top call on the main code path. There are several issues to answer here. First, that "set_fixaddr_top" above would need to be in an #ifdef or otherwise wrapped for the non-paravirt case. Secondly, *if* the only thing that will actually alter the fixaddr_top is paravirt, it makes sense to keep it a constant except in the paravirt case, ie: #ifdef CONFIG_PARAVIRT #define __FIXADDR_TOP (paravirt_ops.linear_top) #else #define __FIXADDR_TOP 0xfffff000 #endif This is simpler and clearer than indirecting through another function (set_fixaddr_top) and another variable (__FIXADDR_TOP). Along similar lines, I dislike a function ->get_linear_top() because obscures the fact that it cannot change. Having a "constant" in an ops structure is a little odd, but it's clear (a-la kernel_rpl). My 2c, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law