From: Zachary Amsden <zach@vmware.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@osdl.org>, Chaz Masden <zamsden@gmail.com>,
Petr Vandrovec <petr@vmware.com>,
virtualization@lists.linux-foundation.org,
Chris Wright <chrisw@sous-sol.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC, PATCH 0/5] Paravirt: fix export of paravirt-ops to binary modules
Date: Mon, 23 Apr 2007 14:18:51 -0700 [thread overview]
Message-ID: <462D22BB.3080909@vmware.com> (raw)
In-Reply-To: <1177290274.17026.42.camel@localhost.localdomain>
Rusty Russell wrote:
> On Mon, 2007-04-23 at 02:49 +0200, Andi Kleen wrote:
>
>> On Monday 23 April 2007 02:24:05 Rusty Russell wrote:
>>
>>> On Mon, 2007-04-23 at 01:49 +0200, Andi Kleen wrote:
>>>
>>>>> Less exports good. Consistency with all config options isn't a hard
>>>>> requirement: I'd be tempted not to export the pte functions.
>>>>>
>>>> Yes paravirt_ops should be probably split into two for internal and external
>>>> available functions. Any takers?
>>>>
>>> Hi Andi!
>>>
>>> I'm a little uncomfortable with cutting the struct this way: I always
>>> thought it'd be a function split if we did one.
>>>
>> It's a functional split, isn't it? arch/mm internal and "exported" to other
>> users
>>
>
> Hi,
>
> When I said functional I was thinking "page table ops" vs "apic ops"
> etc. There's little logic to what needs exporting.
>
> Most modules only need the interrupt operations. A small handful want
> more, and then some (kvm, lguest) need a whole range of crap (these
> should use the native_ versions directly, since nested paravirt is not
> supported).
>
> I did the work before; I'll drag it back out and see what the symbols
> are again...
>
Interrupt control is needed in general. CPUID is also widely used.
FPU control (clts, read / write cr0) is required for certain software
operations.
There are non-obvious exports that are required for some modules; in
particular, MSRs may be used in video drivers, and wbinvd must be
available to hardware drivers. We may wish to simply trap / emulate
these instructions and remove the paravirt-ops altogether. They are not
performance critical in 32-bit, and will complicate loading non-GPL
drivers for a wide range of hardware - hardware that is not exposed in a
virtualized environment to begin with.
Some rather more interesting modules map kernel page tables to read the
physical frame numbers from ptes; this is
safe to do if you get_pages or get_user_pages and keep the pages
locked. This requires kmap_atomic_pte to be available. Similarly,
pte_val and make_pte need to be available. Mostly only modules that
require a native environment (virtualization modules) need them, but we
need some way to either resolve the symbol as load time or make the
requirement for the symbol go away. No matter how you look at it,
failing to load a module because of an unresolved paravirt-op that is
actually going to be reduced to a nop is a very silly situation to be in.
Zach
next prev parent reply other threads:[~2007-04-23 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 1:52 [RFC, PATCH 0/5] Paravirt: fix export of paravirt-ops to binary modules Zachary Amsden
2007-04-20 9:34 ` Andi Kleen
2007-04-20 15:03 ` Jeremy Fitzhardinge
2007-04-20 21:25 ` Zachary Amsden
2007-04-20 21:33 ` Jeremy Fitzhardinge
2007-04-20 21:36 ` Zachary Amsden
2007-04-20 23:01 ` Jeremy Fitzhardinge
2007-04-20 23:02 ` Zachary Amsden
2007-04-22 23:37 ` Rusty Russell
2007-04-22 23:49 ` Andi Kleen
2007-04-23 0:24 ` Rusty Russell
2007-04-23 0:49 ` Andi Kleen
2007-04-23 1:04 ` Rusty Russell
2007-04-23 21:18 ` Zachary Amsden [this message]
2007-04-23 1:00 ` Jeremy Fitzhardinge
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=462D22BB.3080909@vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=mingo@elte.hu \
--cc=petr@vmware.com \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
--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).