Re: [PATCH] Fix building lguest as module.
On Wed, Feb 20, 2008 at 11:01:40AM +0100, Ingo Molnar wrote: > > * Tony Breeds <[EMAIL PROTECTED]> wrote: > > > I've attached the .config FWIW > > indeed you are right... > > I fixed this build failure too - could you check whether x86.git#test > (which has all these lguest build fixes) works fine for you: > >http://people.redhat.com/mingo/x86.git/README > > ? Thanks, Sure that works. I'm not conviniced that your patch is right as it treats gust and host support as the same thing. Having said that we're only talkign about a few constants, so I don't think it's worth anymore time. If it's not right it can be fixed later by those that know better. Yours Tony linux.conf.auhttp://www.marchsouth.org/ Jan 19 - 24 2009 The Australian Linux Technical Conference! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building lguest as module.
* Tony Breeds <[EMAIL PROTECTED]> wrote: > I've attached the .config FWIW indeed you are right... I fixed this build failure too - could you check whether x86.git#test (which has all these lguest build fixes) works fine for you: http://people.redhat.com/mingo/x86.git/README ? Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building lguest as module.
* Tony Breeds <[EMAIL PROTECTED]> wrote: > > the right one is below. There's no 'LGUEST_MODULE' anymore - > > 'LGUEST_GUEST' is what should be used. > > Hmm okay I'm confused now. LGUEST_GUEST is only set when you have > guest support enabled, but if you're only building the host module[1] > then that wont work. i have no strong idea either - but no more lguest build failures anymore in my test setup since i applied your patch with my small tweak. Rusty has pushed his ... lightly tested git tree upstream and went on a vacation. I'm strongly considering this new merge technique for the next merge window myself! ;-) Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building lguest as module.
On Tue, Feb 19, 2008 at 02:54:01PM +0100, Ingo Molnar wrote: > > * Ingo Molnar <[EMAIL PROTECTED]> wrote: > > > > +#endif > > > + > > > +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) > > > + BLANK(); > > > > hm. Rusty's original fix is now upstream. I've done a delta to your > > patch, find the fix is below. Thanks!. > > the right one is below. There's no 'LGUEST_MODULE' anymore - > 'LGUEST_GUEST' is what should be used. Hmm okay I'm confused now. LGUEST_GUEST is only set when you have guest support enabled, but if you're only building the host module[1] then that wont work. Appologies if I've missed soemthing. -=-=-=-=-=-=-=-=-=-=-=- [EMAIL PROTECTED]:~/projects/kernel/working$ git describe v2.6.25-rc2-103-gf702c58 [EMAIL PROTECTED]:~/projects/kernel/working$ egrep LGUEST /scratch/tmp/include/linux/autoconf.h #define CONFIG_LGUEST_MODULE 1 [EMAIL PROTECTED]:~/projects/kernel/working$ egrep 'defined.*CONFIG_LGUEST' arch/x86/kernel/asm-offsets_32.c #if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_GUEST) [EMAIL PROTECTED]:~/projects/kernel/working$ make O=/scratch/tmp -s GEN /scratch/tmp/Makefile Using /home/tony/projects/kernel/working as source for kernel WARNING: modpost: Found 33 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' UPD include/linux/compile.h Building modules, stage 2. ERROR: "LGUEST_PAGES_guest_gdt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_gdt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_cr3" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_regs" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_idt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_guest_gdt" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_sp" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_regs_trapnum" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_guest_idt_desc" [drivers/lguest/lg.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 make[1]: *** Waiting for unfinished jobs Root device is (3, 3) Setup is 11320 bytes (padded to 11776 bytes). System is 2663 kB Kernel: arch/x86/boot/bzImage is ready (#17) make: *** [sub-make] Error 2 -=-=-=-=-=-=-=-=-=-=-=- [EMAIL PROTECTED]:~/projects/kernel/working$ egrep LGUEST /scratch/tmp/include/linux/autoconf.h #define CONFIG_LGUEST_MODULE 1 [EMAIL PROTECTED]:~/projects/kernel/working$ egrep 'defined.*CONFIG_LGUEST' arch/x86/kernel/asm-offsets_32.c #if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) [EMAIL PROTECTED]:~/projects/kernel/working$ make O=/scratch/tmp -s GEN /scratch/tmp/Makefile Using /home/tony/projects/kernel/working as source for kernel WARNING: modpost: Found 33 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' UPD include/linux/compile.h Building modules, stage 2. Root device is (3, 3) Setup is 11320 bytes (padded to 11776 bytes). System is 2663 kB Kernel: arch/x86/boot/bzImage is ready (#18) I've attached the .config FWIW [1] Somewhat strange I agree but valid none the less. Yours Tony linux.conf.auhttp://linux.conf.au/ || http://lca2008.linux.org.au/ Jan 28 - Feb 02 2008 The Australian Linux Technical Conference! # # Automatically generated make config: don't edit # Linux kernel version: 2.6.25-rc2 # Wed Feb 20 09:28:15 2008 # # CONFIG_64BIT is not set CONFIG_X86_32=y # CONFIG_X86_64 is not set CONFIG_X86=y # CONFIG_GENERIC_LOCKBREAK is not set CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_FAST_CMPXCHG_LOCAL=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_QUICKLIST=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y # CONFIG_GENERIC_GPIO is not set CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y # CONFIG_RWSEM_GENERIC_SPINLOCK is not set CONFIG_RWSEM_XCHGADD_ALGORITHM=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y # CONFIG_GENERIC_TIME_VSYSCALL is not set CONFIG_ARCH_HAS_CPU_RELAX=y # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y # CONFIG_ZONE_DMA32 is not set CONFIG_ARCH_POPULATES_NODE_MAP=y # CONFIG_AUDIT_ARCH is not set CONFIG_ARCH_SUPPORTS_AOUT=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_X86_SMP=y CONFIG_X86_32_SMP=y CONFIG_X86_HT=y CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y CONFIG_KTIME_SCALAR=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # General setup # CONFIG_EXPERIMENTAL=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" CONFI
Re: [PATCH] Fix building lguest as module.
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > > +#endif > > + > > +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) > > + BLANK(); > > hm. Rusty's original fix is now upstream. I've done a delta to your > patch, find the fix is below. the right one is below. There's no 'LGUEST_MODULE' anymore - 'LGUEST_GUEST' is what should be used. Ingo ---> Subject: lguest: fix build breakage From: Tony Breeds <[EMAIL PROTECTED]> Date: Tue Feb 19 08:16:03 CET 2008 [ [EMAIL PROTECTED]: merged to Rusty's patch ] Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_32.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-x86.q/arch/x86/kernel/asm-offsets_32.c === --- linux-x86.q.orig/arch/x86/kernel/asm-offsets_32.c +++ linux-x86.q/arch/x86/kernel/asm-offsets_32.c @@ -128,7 +128,7 @@ void foo(void) OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending); #endif -#ifdef CONFIG_LGUEST_GUEST +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_GUEST) BLANK(); OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building lguest as module.
* Tony Breeds <[EMAIL PROTECTED]> wrote: > +#endif > + > +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) > + BLANK(); hm. Rusty's original fix is now upstream. I've done a delta to your patch, find the fix is below. Ingo -> Subject: lguest: fix build breakage From: Tony Breeds <[EMAIL PROTECTED]> Date: Tue Feb 19 08:16:03 CET 2008 [ [EMAIL PROTECTED]: merged to Rusty's patch ] Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> --- arch/x86/kernel/asm-offsets_32.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-x86.q/arch/x86/kernel/asm-offsets_32.c === --- linux-x86.q.orig/arch/x86/kernel/asm-offsets_32.c +++ linux-x86.q/arch/x86/kernel/asm-offsets_32.c @@ -128,7 +128,7 @@ void foo(void) OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending); #endif -#ifdef CONFIG_LGUEST_GUEST +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) BLANK(); OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Fix building lguest as module.
On Mon, Feb 04, 2008 at 07:11:10AM +1100, Rusty Russell wrote: > Lguest guest support and host support are separate config options: they used > to be tied together. Sort out which parts of asm-offsets are needed for Guest > and Host. With rusty's patch applied the errors still persist in some configs. Please try the patch below. Fixes the following errors from modpost when the lguest (host) support is modular. ERROR: "LGUEST_PAGES_guest_gdt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_gdt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_cr3" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_regs" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_idt_desc" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_guest_gdt" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_host_sp" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_regs_trapnum" [drivers/lguest/lg.ko] undefined! ERROR: "LGUEST_PAGES_guest_idt_desc" [drivers/lguest/lg.ko] undefined! Lguest guest support and host support are separate config options: they used to be tied together. Sort out which parts of asm-offsets are needed for Guest and Host. Signed-off-by: Tony Breeds <[EMAIL PROTECTED]> --- Original patch from rusty (http://lkml.org/lkml/2008/2/3/168) didn't completely fix the problem. I think this matches the original intent. Not sure of the right way to attribute this patch, clearlyt it's mostly Rusty's work. arch/x86/kernel/asm-offsets_32.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c index afd8446..ae9d289 100644 --- a/arch/x86/kernel/asm-offsets_32.c +++ b/arch/x86/kernel/asm-offsets_32.c @@ -20,10 +20,8 @@ #include -#ifdef CONFIG_LGUEST_GUEST #include #include "../../../drivers/lguest/lg.h" -#endif #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -134,6 +132,10 @@ void foo(void) BLANK(); OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir); +#endif + +#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE) + BLANK(); OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); -- 1.5.4.1 Yours Tony linux.conf.auhttp://linux.conf.au/ || http://lca2008.linux.org.au/ Jan 28 - Feb 02 2008 The Australian Linux Technical Conference! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/