Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759013AbYBQOGS (ORCPT ); Sun, 17 Feb 2008 09:06:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755646AbYBQOGG (ORCPT ); Sun, 17 Feb 2008 09:06:06 -0500 Received: from an-out-0708.google.com ([209.85.132.250]:44777 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755530AbYBQOGF (ORCPT ); Sun, 17 Feb 2008 09:06:05 -0500 Message-ID: <47B83F90.7000203@larces.uece.br> Date: Sun, 17 Feb 2008 11:07:12 -0300 From: Sergio Luis User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Thomas Gleixner CC: Rusty Russell , Ingo Molnar , linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum' References: <20080201124520.GA29900@elte.hu> <20080201170551.GA3825@elte.hu> <200802040711.11280.rusty@rustcorp.com.au> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3394 Lines: 88 Thomas Gleixner wrote: > On Mon, 4 Feb 2008, Rusty Russell wrote: > >> On Saturday 02 February 2008 04:05:51 Ingo Molnar wrote: >>> looks similar to the previous one so i guess my quick fix attempt was a >>> bit too quick. Will turn lguest off again. And i'm willing to test >>> patches as well :) >> Hi Ingo, >> >> OK, this problem was caused by asm-offsets.c only having the offsets when >> lguest *guest* support was set, not lguest host (host support used to imply >> guest support, so now they're separate these bugs come out). >> >> Can you throw this patch into your tree for testing? >> >> Thanks, >> Rusty. > > Applied. Thanks, > > tglx > It doesn't fix the problem totally. If we select Virtualization->Linux hypervisor example code (CONFIG_LGUEST) as a module, we will get the same build errors, since the related offsets won't be generated in include/asm-x86/asm-offset.h >From arch/x86/kernel/asm_offsets_32.c [...] #ifdef CONFIG_LGUEST 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); OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc); OFFSET(LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc); OFFSET(LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt); OFFSET(LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum); OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode); OFFSET(LGUEST_PAGES_regs, lguest_pages, regs); #endif [...] -sergio >> 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: Rusty Russell >> >> diff -r 7d5a5c7a4b95 arch/x86/kernel/asm-offsets_32.c >> --- a/arch/x86/kernel/asm-offsets_32.c Sat Feb 02 23:13:05 2008 +1100 >> +++ b/arch/x86/kernel/asm-offsets_32.c Sun Feb 03 10:13:19 2008 +1100 >> @@ -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 >> + >> +#ifdef CONFIG_LGUEST >> + 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); >> > -- > 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/ -- 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/