virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [RFC, PATCH 5/5] Paravirt_ops export.patch
@ 2007-04-20  1:53 Zachary Amsden
  2007-04-20  5:10 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 15+ messages in thread
From: Zachary Amsden @ 2007-04-20  1:53 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen, Jeremy Fitzhardinge, Rusty Russell,
	Chris Wright, Ingo Molnar, Petr Vandrovec, Pratap Subrahmanyam,
	Dan Hecht, Dan Arai, Virtualization Mailing List, Chaz Masden,
	Zachary Amsden

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

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

end of thread, other threads:[~2007-04-23 22:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-20  1:53 [RFC, PATCH 5/5] Paravirt_ops export.patch Zachary Amsden
2007-04-20  5:10 ` 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

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