From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization <virtualization@lists.linux-foundation.org>,
Andi Kleen <ak@muc.de>
Subject: [PATCH 3/8] lguest: the asm offsets
Date: Tue, 10 Apr 2007 21:07:11 +1000 [thread overview]
Message-ID: <1176203231.26372.27.camel@localhost.localdomain> (raw)
In-Reply-To: <1176203176.26372.25.camel@localhost.localdomain>
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>
---
arch/i386/kernel/asm-offsets.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
===================================================================
--- a/arch/i386/kernel/asm-offsets.c
+++ b/arch/i386/kernel/asm-offsets.c
@@ -16,6 +16,10 @@
#include <asm/thread_info.h>
#include <asm/elf.h>
#include <asm/pda.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))
@@ -114,4 +118,19 @@ void foo(void)
OFFSET(PARAVIRT_iret, paravirt_ops, iret);
OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0);
#endif
+
+#ifdef CONFIG_LGUEST_GUEST
+ BLANK();
+ OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
+ 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
}
next prev parent reply other threads:[~2007-04-10 11:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 11:04 [PATCH 0/8] lguest Rusty Russell
2007-04-10 11:05 ` [PATCH 1/8] lguest: the guest code Rusty Russell
2007-04-10 11:06 ` [PATCH 2/8] lguest: the host code Rusty Russell
2007-04-10 11:07 ` Rusty Russell [this message]
2007-04-10 11:08 ` [PATCH 4/8] lguest: the Makefile and Kconfig Rusty Russell
2007-04-10 11:08 ` [PATCH 5/8] lguest: the console driver Rusty Russell
2007-04-10 11:09 ` [PATCH 5/8] lguest: the net driver Rusty Russell
2007-04-10 11:11 ` [PATCH 6/8] " Rusty Russell
2007-04-10 11:12 ` PATCH 7/8] lguest: the block driver Rusty Russell
2007-04-10 11:12 ` [PATCH 8/8] lguest: the documentation, example launcher Rusty Russell
2007-04-10 11:28 ` PATCH 7/8] lguest: the block driver Pekka Enberg
2007-04-10 11:36 ` Pekka Enberg
2007-04-11 4:00 ` Rusty Russell
2007-04-11 5:29 ` Pekka Enberg
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=1176203231.26372.27.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox