aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-07-19 04:49:26 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:52 -0400
commit6db7016d17b235a24e0c1544c202defa47ae7247 (patch)
tree1e8f8a78d6d1a16e87426f5cf0e2ca27d9b90012 /arch/i386/kernel/asm-offsets.c
parentd7e28ffe6c74416b54345d6004fd0964c115b12c (diff)
lguest: the asm offsets
This is the structure offsets required by lg.ko's switcher.S. Unfortunately we don't have infrastructure for private asm-offsets creation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/asm-offsets.c')
-rw-r--r--arch/i386/kernel/asm-offsets.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c
index 25f7eb51392..7288ac88d74 100644
--- a/arch/i386/kernel/asm-offsets.c
+++ b/arch/i386/kernel/asm-offsets.c
@@ -19,6 +19,11 @@
19 19
20#include <xen/interface/xen.h> 20#include <xen/interface/xen.h>
21 21
22#ifdef CONFIG_LGUEST_GUEST
23#include <linux/lguest.h>
24#include "../../../drivers/lguest/lg.h"
25#endif
26
22#define DEFINE(sym, val) \ 27#define DEFINE(sym, val) \
23 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 28 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
24 29
@@ -124,4 +129,19 @@ void foo(void)
124 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask); 129 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
125 OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending); 130 OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
126#endif 131#endif
132
133#ifdef CONFIG_LGUEST_GUEST
134 BLANK();
135 OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
136 OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
137 OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
138 OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
139 OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp);
140 OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc);
141 OFFSET(LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc);
142 OFFSET(LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt);
143 OFFSET(LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum);
144 OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode);
145 OFFSET(LGUEST_PAGES_regs, lguest_pages, regs);
146#endif
127} 147}