virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [patch 4/9] lguest: the asm offsets
@ 2007-05-09  9:51 akpm
  2007-05-09 20:46 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: akpm @ 2007-05-09  9:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: virtualization, akpm, rusty, ak

From: Rusty Russell <rusty@rustcorp.com.au>

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

 arch/i386/kernel/asm-offsets.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff -puN arch/i386/kernel/asm-offsets.c~lguest-the-asm-offsets arch/i386/kernel/asm-offsets.c
--- a/arch/i386/kernel/asm-offsets.c~lguest-the-asm-offsets
+++ a/arch/i386/kernel/asm-offsets.c
@@ -17,6 +17,10 @@
 #include <asm/pgtable.h>
 #include <asm/thread_info.h>
 #include <asm/elf.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))
@@ -116,4 +120,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
 }
_

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 4/9] lguest: the asm offsets
  2007-05-09  9:51 [patch 4/9] lguest: the asm offsets akpm
@ 2007-05-09 20:46 ` Sam Ravnborg
  2007-05-10  0:09   ` Rusty Russell
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2007-05-09 20:46 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, virtualization, rusty, ak

On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote:
> From: Rusty Russell <rusty@rustcorp.com.au>
> 
> This is the structure offsets required by lg.ko's switcher.S.
> 
> Unfortunately we don't have infrastructure for private asm-offsets
> creation.
Someone maybe it was Oleg? did an OK job to abstract out asm-offset
generation. I asked to have it rebased but never heard anything back.

I would like to get this generic approach in and then let lguest use it.
But I do not see this as a reason to hold back inclusion in -linus.

But could we please get rid of the "../../../" in the include....

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 4/9] lguest: the asm offsets
  2007-05-09 20:46 ` Sam Ravnborg
@ 2007-05-10  0:09   ` Rusty Russell
  2007-06-11 12:49     ` Oleg Verych
  0 siblings, 1 reply; 5+ messages in thread
From: Rusty Russell @ 2007-05-10  0:09 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: akpm, linux-kernel, virtualization, ak

On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote:
> On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote:
> > From: Rusty Russell <rusty@rustcorp.com.au>
> > 
> > This is the structure offsets required by lg.ko's switcher.S.
> > 
> > Unfortunately we don't have infrastructure for private asm-offsets
> > creation.
> Someone maybe it was Oleg? did an OK job to abstract out asm-offset
> generation. I asked to have it rebased but never heard anything back.
> 
> I would like to get this generic approach in and then let lguest use it.
> But I do not see this as a reason to hold back inclusion in -linus.

Hi Sam,

	Yeah, I never heard back either.  And I'm reluctant to try to fix it
myself: I've never managed to patch the build system without causing you
to rewrite it better 8)

> But could we please get rid of the "../../../" in the include....

	Sure: but how?  It's a private internal include for the lg.ko module.

Thanks!
Rusty.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 4/9] lguest: the asm offsets
  2007-05-10  0:09   ` Rusty Russell
@ 2007-06-11 12:49     ` Oleg Verych
  2007-06-11 12:59       ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Verych @ 2007-06-11 12:49 UTC (permalink / raw)
  To: Rusty Russell, Sam Ravnborg; +Cc: akpm, linux-kernel, virtualization, ak

* Date: Thu, 10 May 2007 10:09:39 +1000
>
> On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote:
>> On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote:
>> > From: Rusty Russell <rusty@rustcorp.com.au>
>> > 
>> > This is the structure offsets required by lg.ko's switcher.S.
>> > 
>> > Unfortunately we don't have infrastructure for private asm-offsets
>> > creation.
>> Someone maybe it was Oleg? did an OK job to abstract out asm-offset
>> generation. I asked to have it rebased but never heard anything back.
>> 
>> I would like to get this generic approach in and then let lguest use it.
>> But I do not see this as a reason to hold back inclusion in -linus.
>
> Hi Sam,
>
> 	Yeah, I never heard back either.  And I'm reluctant to try to fix it
> myself: I've never managed to patch the build system without causing you
> to rewrite it better 8)

If it's still open, i can try, after getting back from RL and 28k LKML
backlog ;)
____

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 4/9] lguest: the asm offsets
  2007-06-11 12:49     ` Oleg Verych
@ 2007-06-11 12:59       ` Sam Ravnborg
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2007-06-11 12:59 UTC (permalink / raw)
  To: Oleg Verych; +Cc: Rusty Russell, akpm, linux-kernel, virtualization, ak

On Mon, Jun 11, 2007 at 02:49:32PM +0200, Oleg Verych wrote:
> * Date: Thu, 10 May 2007 10:09:39 +1000
> >
> > On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote:
> >> On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote:
> >> > From: Rusty Russell <rusty@rustcorp.com.au>
> >> > 
> >> > This is the structure offsets required by lg.ko's switcher.S.
> >> > 
> >> > Unfortunately we don't have infrastructure for private asm-offsets
> >> > creation.
> >> Someone maybe it was Oleg? did an OK job to abstract out asm-offset
> >> generation. I asked to have it rebased but never heard anything back.
> >> 
> >> I would like to get this generic approach in and then let lguest use it.
> >> But I do not see this as a reason to hold back inclusion in -linus.
> >
> > Hi Sam,
> >
> > 	Yeah, I never heard back either.  And I'm reluctant to try to fix it
> > myself: I've never managed to patch the build system without causing you
> > to rewrite it better 8)
> 
> If it's still open, i can try, after getting back from RL and 28k LKML
> backlog ;)

Hi Olg.

Please do so.
Thanks,
	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-11 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-09  9:51 [patch 4/9] lguest: the asm offsets akpm
2007-05-09 20:46 ` Sam Ravnborg
2007-05-10  0:09   ` Rusty Russell
2007-06-11 12:49     ` Oleg Verych
2007-06-11 12:59       ` Sam Ravnborg

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