From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>, Rusty Russell <rusty@rustcorp.com.au>,
Avi Kivity <avi@qumranet.com>,
Glauber de Oliveira Costa <glommer@gmail.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
Date: Fri, 28 Sep 2007 11:49:06 -0700 [thread overview]
Message-ID: <46FD4CA2.30402@goop.org> (raw)
In-Reply-To: <1191004776.18310.16.camel@bodhitayantram.eng.vmware.com>
Zachary Amsden wrote:
> On Fri, 2007-09-28 at 11:10 -0700, Jeremy Fitzhardinge wrote:
>
>> This patch refactors the paravirt_ops structure into groups of
>> functionally related ops:
>>
>> pv_info - random info, rather than function entrypoints
>> pv_init_ops - functions used at boot time (some for module_init too)
>> pv_misc_ops - lazy mode, which didn't fit well anywhere else
>> pv_time_ops - time-related functions
>> pv_cpu_ops - various privileged instruction ops
>> pv_irq_ops - operations for managing interrupt state
>> pv_apic_ops - APIC operations
>> pv_mmu_ops - operations for managing pagetables
>>
>> There are several motivations for this:
>>
>> 1. Some of these ops will be general to all x86, and some will be
>> i386/x86-64 specific. This makes it easier to share common stuff
>> while allowing separate implementations where needed.
>>
>> 2. At the moment we must export all of paravirt_ops, but modules only
>> need selected parts of it. This allows us to export on a case by case
>> basis (and also choose which export license we want to apply).
>>
>
> We shouldn't need to export pv_init_ops.
No. The only ones I export are:
EXPORT_SYMBOL_GPL(pv_time_ops);
EXPORT_SYMBOL_GPL(pv_cpu_ops);
EXPORT_SYMBOL_GPL(pv_mmu_ops);
EXPORT_SYMBOL_GPL(pv_apic_ops);
EXPORT_SYMBOL (pv_irq_ops);
> It is debatable whether
> CR2/CR3 should be part of CPU or MMU ops.
Yeah, I was in two minds. CR3, at least, should be grouped with the
other tlb operations, wherever they go. And while they're privileged
CPU instructions (cpu_ops), they're more logically related to the rest
of the mmu state. On the other hand, we could have an ops structure
specifically dedicated to pagetable manipulations, and put the cr3/tlb
ops elsewhere.
> Also, can we drop write_cr2?
> It isn't used anywhere, so the only reason to keep it is symmetry.
> Which was a fine argument when it was an inline, but now it just adds
> unused junk to the code.
>
I think its used in some cpu state save/restore code, but its not
relevant to pv-ops.
J
next prev parent reply other threads:[~2007-09-28 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-28 18:10 [PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops Jeremy Fitzhardinge
2007-09-28 18:39 ` Zachary Amsden
2007-09-28 18:49 ` Jeremy Fitzhardinge [this message]
2007-09-28 19:02 ` Zachary Amsden
2007-09-28 23:25 ` Nakajima, Jun
2007-09-28 23:36 ` Jeremy Fitzhardinge
2007-09-29 0:19 ` Nakajima, Jun
2007-09-29 0:40 ` Jeremy Fitzhardinge
2007-09-29 16:55 ` Nakajima, Jun
2007-09-29 17:01 ` 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=46FD4CA2.30402@goop.org \
--to=jeremy@goop.org \
--cc=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=anthony@codemonkey.ws \
--cc=avi@qumranet.com \
--cc=glommer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.osdl.org \
--cc=zach@vmware.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).