Rusty Russell wrote: > 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. > Well, that's simple and self-contained. Besides, by the time we're done there won't be a need for !PARAVIRT ;) > 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: > Gerd's original patch also supported a kernel parameter to set it. Was that for anything in particular? > #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). > If code assumes it is a simple compile-time constant in the non-paravirt case, it will break paravirt. At least making it clearly C syntax will prevent people from putting it into asm or .lds files. But it still seems to me it could be a variable either way. Are there any performance-critical users of it? J