virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Nakajima, Jun" <jun.nakajima@intel.com>
Cc: Andi Kleen <ak@suse.de>, Zachary Amsden <zach@vmware.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Avi Kivity <avi@qumranet.com>,
	Glauber de Oliveira Costa <glommer@gmail.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Virtualization Mailing List <virtualization@lists.osdl.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	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 16:36:01 -0700	[thread overview]
Message-ID: <46FD8FE1.4090507@goop.org> (raw)
In-Reply-To: <97D612E30E1F88419025B06CB4CF1BE10396C957@scsmsx412.amr.corp.intel.com>

Nakajima, Jun wrote:
> 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
>>
>>     
>
> Good. These make sense to me.
>
>   
>> +	.pv_irq_ops = {
>> +		 .init_IRQ = native_init_IRQ,
>> +		 .save_fl = native_save_fl,
>> +		 .restore_fl = native_restore_fl,
>> +		 .irq_disable = native_irq_disable,
>> +		 .irq_enable = native_irq_enable,
>> +		 .safe_halt = native_safe_halt,
>> +		 .halt = native_halt,
>> +	 },
>>     
>
> I think the halt stuff should be moved to pv_cpu_ops?
>   
You mean halt's alternate "shutdown vcpu" meaning if you call it with
interrupts disabled?  Yeah, I'd be happy to have an explicit op for
that, rather than making it a secondary overloaded meaning.  And use
"safe_halt" for all uses of "wait for next interrupt".

>> +	.pv_misc_ops = {
>> +		 .set_lazy_mode = paravirt_nop,
>> +	 },
>>     
>
> Or you can split it to pv_cpu_ops and pv_mmu_ops, assuming that they
> don't need to interact with each other in terms of the lazy handling.
>   

You mean have separate lazy_mmu and lazy_cpu (lazy_context_switch) ops? 
Possible, but they're still exclusive.  (I think VMI, at least, assumes
that you can't have lazy_mmu and lazy_cpu active at the same time, and
its nice to enforce this in the interface.)

But having a whole misc structure for this interface is pretty warty, I
admit.

    J

  reply	other threads:[~2007-09-28 23:36 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
2007-09-28 19:02     ` Zachary Amsden
2007-09-28 23:25 ` Nakajima, Jun
2007-09-28 23:36   ` Jeremy Fitzhardinge [this message]
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=46FD8FE1.4090507@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=jun.nakajima@intel.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).