From: Zachary Amsden <zach@vmware.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Arjan van de Ven <arjan@infradead.org>,
Adrian Bunk <bunk@stusta.de>
Subject: Re: [patch] paravirt: isolate module ops
Date: Fri, 05 Jan 2007 16:31:39 -0800 [thread overview]
Message-ID: <459EEDEB.8090800@vmware.com> (raw)
In-Reply-To: <20070106000715.GA6688@elte.hu>
Ingo Molnar wrote:
> Subject: [patch] paravirt: isolate module ops
> From: Ingo Molnar <mingo@elte.hu>
>
> 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@elte.hu>
> ---
> 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,
>
I don't think you want to leave that one... patching the kernel isn't
something modules should be doing.
Perhaps a separate structure is better for module ops - this seems error
prone to calling the wrong one of paravirt_ops vs. paravirt_mod_ops,
also error prone to set them up in the code which sets paravirt_ops for
each hypervisor. Although that does require more dissection, it does
make sure everyone gets it right, and makes the interface very
explicitly clear in the header file, which is nice.
If you feel strongly about this, I suggest you push it upstream now, not
into Andrew's tree (it doesn't apply cleanly there, and breaks the VMI
patches which are in there). But this is no problem, I can fix that up
easily once you get it in.
Zach
next prev parent reply other threads:[~2007-01-06 0:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 0:07 [patch] paravirt: isolate module ops Ingo Molnar
2007-01-06 0:31 ` Zachary Amsden [this message]
2007-01-06 6:25 ` Rusty Russell
2007-01-06 7:08 ` Ingo Molnar
2007-01-06 7:12 ` Ingo Molnar
2007-01-06 17:42 ` Rusty Russell
2007-01-06 18:32 ` Ingo Molnar
2007-01-06 20:55 ` Zachary Amsden
2007-01-07 1:09 ` Rusty Russell
2007-01-07 14:07 ` Zachary Amsden
2007-01-06 7:14 ` Ingo Molnar
2007-01-06 9:50 ` Zachary Amsden
2007-01-06 10:52 ` Arjan van de Ven
2007-01-06 16:18 ` Rusty Russell
2007-01-06 19:31 ` Christoph Hellwig
2007-01-07 5:35 ` Rusty Russell
2007-01-07 18:39 ` Christoph Hellwig
2007-01-07 18:43 ` Ingo Molnar
2007-01-08 0:54 ` Dave Airlie
2007-01-06 1:02 ` Zachary Amsden
2007-01-06 2:07 ` Arjan van de Ven
2007-01-06 4:41 ` Zachary Amsden
2007-01-06 5:34 ` 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=459EEDEB.8090800@vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
/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