LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: tony@bakeyournoodle.com (Tony Breeds)
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
lguest@ozlabs.org
Subject: [PATCH] Fix building lguest as module.
Date: Tue, 19 Feb 2008 14:44:04 +1100 [thread overview]
Message-ID: <20080219034404.GT6887@bakeyournoodle.com> (raw)
In-Reply-To: <200802040711.11280.rusty@rustcorp.com.au>
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.
<snip> 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 <tony@bakeyournoodle.com>
---
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 <xen/interface/xen.h>
-#ifdef CONFIG_LGUEST_GUEST
#include <linux/lguest.h>
#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.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
next prev parent reply other threads:[~2008-02-19 3:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-01 12:45 [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum' Ingo Molnar
2008-02-01 17:05 ` Ingo Molnar
2008-02-02 12:25 ` Rusty Russell
2008-02-03 20:11 ` Rusty Russell
2008-02-17 13:51 ` Thomas Gleixner
2008-02-17 14:07 ` Sergio Luis
2008-02-17 20:11 ` Christian Kujau
2008-02-18 1:04 ` Sergio Luis
2008-02-18 1:31 ` Sergio Luis
2008-02-18 22:14 ` Christian Kujau
2008-02-18 22:19 ` Sergio Luis
2008-02-19 21:20 ` Christian Kujau
2008-02-19 3:44 ` Tony Breeds [this message]
2008-02-19 7:32 ` [PATCH] Fix building lguest as module Ingo Molnar
2008-02-19 13:54 ` Ingo Molnar
2008-02-19 23:35 ` Tony Breeds
2008-02-20 9:33 ` Ingo Molnar
2008-02-20 10:01 ` Ingo Molnar
2008-02-22 5:58 ` Tony Breeds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080219034404.GT6887@bakeyournoodle.com \
--to=tony@bakeyournoodle.com \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
--subject='Re: [PATCH] Fix building lguest as module.' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).