virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@muc.de>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Chris Wright <chrisw@sous-sol.org>, Ingo Molnar <mingo@elte.hu>,
	Petr Vandrovec <petr@vmware.com>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Dan Hecht <dhecht@vmware.com>, Dan Arai <arai@vmware.com>,
	Virtualization Mailing List <virtualization@lists.osdl.org>,
	Chaz Masden <zamsden@gmail.com>, Zachary Amsden <zach@vmware.com>
Subject: [RFC, PATCH 5/5] Paravirt_ops export.patch
Date: Thu, 19 Apr 2007 18:53:04 -0700 (PDT)	[thread overview]
Message-ID: <20070420015304.74394BFC@zach-dev2.vmware.com> (raw)

Now that paravirt-ops is a fully patched, purely functional interface,
which appropriately generates bugs when patches fail to get applied,
it need no longer be exported to modules.  Modules will be patched at
load time, and need no boot time fallback which references paravirt-ops.

Now, all traditional functionality which was inlined into modules before
is still available to modules with paravirt_ops, but there is no danger
of exporting it to rogue or non-GPL modules.

Signed-off-by: Zachary Amsden <zach@vmware.com>

diff -r 80ddc95c2ab2 arch/i386/kernel/paravirt.c
--- a/arch/i386/kernel/paravirt.c	Thu Apr 19 16:17:36 2007 -0700
+++ b/arch/i386/kernel/paravirt.c	Thu Apr 19 16:22:25 2007 -0700
@@ -353,11 +353,3 @@ struct paravirt_ops paravirt_ops = {
 
 	.startup_ipi_hook = paravirt_nop,
 };
-
-/*
- * NOTE: CONFIG_PARAVIRT is experimental and the paravirt_ops
- * semantics are subject to change. Hence we only do this
- * internal-only export of this, until it gets sorted out and
- * all lowlevel CPU ops used by modules are separately exported.
- */
-EXPORT_SYMBOL_GPL(paravirt_ops);
diff -r 80ddc95c2ab2 include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h	Thu Apr 19 16:17:36 2007 -0700
+++ b/include/asm-i386/paravirt.h	Thu Apr 19 16:29:56 2007 -0700
@@ -266,8 +266,16 @@ unsigned paravirt_patch_insns(void *site
  * The type number, computed in PARAVIRT_PATCH, is derived from the
  * offset into the paravirt_ops structure, and can therefore be freely
  * converted back into a structure offset.
+ *
+ * For modules, generate a bogus BUG, which leaves enough space for
+ * the patch to a direct call to be made and eliminates the need to
+ * export paravirt_ops to modules.
  */
+#ifdef MODULE
+#define PARAVIRT_CALL	"ud2a; nop; nop; nop;"
+#else
 #define PARAVIRT_CALL	"call *(paravirt_ops+%c[paravirt_typenum]*4);"
+#endif
 
 /*
  * These macros are intended to wrap calls into a paravirt_ops

             reply	other threads:[~2007-04-20  1:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20  1:53 Zachary Amsden [this message]
2007-04-20  5:10 ` [RFC, PATCH 5/5] Paravirt_ops export.patch Jeremy Fitzhardinge
2007-04-22 14:28   ` Eric W. Biederman
2007-04-22 16:20     ` Jeremy Fitzhardinge
2007-04-22 16:59     ` Zachary Amsden
2007-04-22 17:31       ` Jeremy Fitzhardinge
2007-04-23 20:53         ` Zachary Amsden
2007-04-23 21:14           ` Eric W. Biederman
2007-04-23 21:40             ` Zachary Amsden
2007-04-23 21:29           ` Jeremy Fitzhardinge
2007-04-23 21:54             ` Zachary Amsden
2007-04-23 22:15               ` Jeremy Fitzhardinge
2007-04-23 22:24                 ` Zachary Amsden
2007-04-23 22:29                   ` Andi Kleen
2007-04-22 23:57     ` Rusty Russell

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=20070420015304.74394BFC@zach-dev2.vmware.com \
    --to=zach@vmware.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=arai@vmware.com \
    --cc=chrisw@sous-sol.org \
    --cc=dhecht@vmware.com \
    --cc=jeremy@goop.org \
    --cc=mingo@elte.hu \
    --cc=petr@vmware.com \
    --cc=pratap@vmware.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.org \
    --cc=zamsden@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).