Subject: [patch] paravirt: isolate module ops
From: Ingo Molnar <mingo@xxxxxxx>
only export those operations to modules that have been available to them historically: irq disable/enable, io-delay, udelay, etc.
this isolates that functionality from other paravirtualization functionality that modules have no business messing with.
boot and build tested with CONFIG_PARAVIRT=y.
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/i386/kernel/paravirt.c | 41 +++++++++++++++++++++++++++
include/asm-i386/delay.h | 4 +-
include/asm-i386/paravirt.h | 65 ++++++++++++++++++++++----------------------
3 files changed, 75 insertions(+), 35 deletions(-)
Index: linux/arch/i386/kernel/paravirt.c
===================================================================
--- linux.orig/arch/i386/kernel/paravirt.c
+++ linux/arch/i386/kernel/paravirt.c
@@ -492,6 +492,7 @@ struct paravirt_ops paravirt_ops = {
.patch = native_patch,
.banner = default_banner,
+
.arch_setup = native_nop,
.memory_setup = machine_specific_memory_setup,
.get_wallclock = native_get_wallclock,
@@ -566,4 +567,42 @@ struct paravirt_ops paravirt_ops = {
.irq_enable_sysexit = native_irq_enable_sysexit,
.iret = native_iret,
};
-EXPORT_SYMBOL(paravirt_ops);
+
+/*
+ * These are exported to modules:
+ */
+struct paravirt_ops paravirt_mod_ops = {
+ .name = "bare hardware",
+ .paravirt_enabled = 0,
+ .kernel_rpl = 0,
+
+ .patch = native_patch,