aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}