1
0
Fork 0

x86: fix lguest build failure

drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): 
	undefined reference to `LGUEST_PAGES_regs_trapnum'

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).

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 <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
hifive-unleashed-5.1
Rusty Russell 2008-02-04 07:11:10 +11:00 committed by Thomas Gleixner
parent b7ad149d62
commit f6c540cdd6
1 changed files with 4 additions and 2 deletions

View File

@ -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
#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);