mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: Sam Ravnborg <sam@ravnborg.org>, Rusty Russell <rusty@rustcorp.com.au>
Cc: LKML <linux-kernel@vger.kernel.org>, kbuild-devel@lists.sourceforge.net
Subject: [patch 03/03] kbuild, asm-values: private for lguest
Date: Wed, 13 Jun 2007 01:36:53 +0200	[thread overview]
Message-ID: <20070612234558.915990000@flower.upol.cz> (raw)
In-Reply-To: <20070612233650.486224000@flower.upol.cz>

[-- Attachment #1: kbuild-asm-values-lguest-private.patch --]
[-- Type: text/plain, Size: 2016 bytes --]

	A small example of how it can be used privately.

rfc-by: Oleg Verych
---
 TODO: change lguest files to use it.

 drivers/lguest/Makefile     |    4 ++++
 drivers/lguest/asm-values.c |   24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

Index: linux-2.6.22-rc4-mm2/drivers/lguest/Makefile
===================================================================
--- linux-2.6.22-rc4-mm2.orig/drivers/lguest/Makefile	2007-06-13 01:25:17.931654500 +0200
+++ linux-2.6.22-rc4-mm2/drivers/lguest/Makefile	2007-06-13 01:29:01.337616500 +0200
@@ -1,2 +1,6 @@
+# Generate private asm-values.h
+ASM_NS = LGUEST
+include $(srctree)/scripts/Makefile.asm
+
 # Guest requires the paravirt_ops replacement and the bus driver.
 obj-$(CONFIG_LGUEST_GUEST) += lguest.o lguest_asm.o lguest_bus.o
Index: linux-2.6.22-rc4-mm2/drivers/lguest/asm-values.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.22-rc4-mm2/drivers/lguest/asm-values.c	2007-06-13 01:29:01.337616500 +0200
@@ -0,0 +1,24 @@
+/*
+ * Private definitions needed by lguest's assembly language modules.
+ */
+
+#include <linux/lguest.h>
+#include "lg.h"
+#include <asm-generic/asm-values.h>
+
+void fell_guest(void);
+
+void fell_guest(void)
+{
+	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);
+}

--


      parent reply	other threads:[~2007-06-12 23:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12 23:36 [patch 00/03] kbuild, asm-values: not only offsets, not only for $ARCH Oleg Verych
2007-06-12 23:36 ` [patch 01/03] kbuild, asm-values: infrastructure Oleg Verych
2007-06-14  7:41   ` Oleg Verych
2007-06-14  9:12     ` Sam Ravnborg
2007-06-14 11:16       ` Need opinions on asm-offsets cleanup (Re: [patch 01/03] kbuild, asm-values: infrastructure) Oleg Verych
2007-06-14 11:23         ` Sam Ravnborg
2007-09-16 18:29   ` [patch 01/03] kbuild, asm-values: infrastructure Sam Ravnborg
2007-09-16 19:32     ` Rename asm-offsets tool or not? (Re: [patch 01/03] kbuild, asm-values: infrastructure) Oleg Verych
2007-09-16 20:12       ` Sam Ravnborg
2007-06-12 23:36 ` [patch 02/03] kbuild, asm-values: successor of asm-offsets Oleg Verych
2007-06-13  8:55   ` Removing of dummy asm-offset files (Re: [patch 02/03] kbuild, asm-values: successor of asm-offsets) Oleg Verych
2007-06-12 23:36 ` Oleg Verych [this message]

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=20070612234558.915990000@flower.upol.cz \
    --to=olecom@flower.upol.cz \
    --cc=kbuild-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®