virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* paravirt_ops.safe_halt vs .halt?
@ 2006-09-21 19:30 Jeremy Fitzhardinge
  2006-09-21 19:44 ` Chris Wright
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Fitzhardinge @ 2006-09-21 19:30 UTC (permalink / raw)
  To: Rusty Russell, Chris Wright; +Cc: Virtualization Mailing List

What's paravirt_ops.halt for?  Is it the non-safe equivalent to 
safe_halt, or is it intended for shutting down the machine?  It doesn't 
seem to be used anywhere.

    J

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: paravirt_ops.safe_halt vs .halt?
  2006-09-21 19:30 paravirt_ops.safe_halt vs .halt? Jeremy Fitzhardinge
@ 2006-09-21 19:44 ` Chris Wright
  2006-09-21 20:32   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wright @ 2006-09-21 19:44 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: Chris Wright, Virtualization Mailing List

* Jeremy Fitzhardinge (jeremy@goop.org) wrote:
> What's paravirt_ops.halt for?  Is it the non-safe equivalent to 
> safe_halt, or is it intended for shutting down the machine?  It doesn't 
> seem to be used anywhere.

It's called from halt().  Xen should be using it to down the cpu.

thanks,
-chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: paravirt_ops.safe_halt vs .halt?
  2006-09-21 19:44 ` Chris Wright
@ 2006-09-21 20:32   ` Jeremy Fitzhardinge
  2006-09-21 20:58     ` Zachary Amsden
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Fitzhardinge @ 2006-09-21 20:32 UTC (permalink / raw)
  To: Chris Wright; +Cc: Virtualization Mailing List

Chris Wright wrote:
> * Jeremy Fitzhardinge (jeremy@goop.org) wrote:
>   
>> What's paravirt_ops.halt for?  Is it the non-safe equivalent to 
>> safe_halt, or is it intended for shutting down the machine?  It doesn't 
>> seem to be used anywhere.
>>     
>
> It's called from halt().  Xen should be using it to down the cpu.
>   

Wonder if we shouldn't give it a less ambigious name...  Or rename 
safe_halt to block() or something.

    J

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: paravirt_ops.safe_halt vs .halt?
  2006-09-21 20:32   ` Jeremy Fitzhardinge
@ 2006-09-21 20:58     ` Zachary Amsden
  0 siblings, 0 replies; 4+ messages in thread
From: Zachary Amsden @ 2006-09-21 20:58 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: Chris Wright, Virtualization Mailing List

Jeremy Fitzhardinge wrote:
> Chris Wright wrote:
>   
>> * Jeremy Fitzhardinge (jeremy@goop.org) wrote:
>>   
>>     
>>> What's paravirt_ops.halt for?  Is it the non-safe equivalent to 
>>> safe_halt, or is it intended for shutting down the machine?  It doesn't 
>>> seem to be used anywhere.
>>>     
>>>       
>> It's called from halt().  Xen should be using it to down the cpu.
>>     

It's also called whenever there is a raw hlt instruction.  Which happens 
in some cases when you don't want to shutdown the CPU (at least, testing 
HLT instruction).  So there are really three kinds of halt

1) safe_halt  - safely halt and enable interrupts
2) shutdown_halt - halt and disable interrupts to shut down the CPU 
(some cases of this are bare hlts)
3) bare_hlt - hlt for other reasons than the above, or in regions know 
to already have interrupts enabled, thus avoiding the extra sti.  This 
avoidance is pretty silly, considering the only bare halts I believe are 
in bootup code.

We had this triple abstraction in VMI when it was a subarch, but it was 
unclear it was worth imposing on places that weren't really applicable 
to a virtualization context.

In short, perhaps it is best to separate safe_halt vs shutdown_halt and 
unconditionally use sti; hlt or cli; hlt instead of providing a bare 
halt paravirt op.

Zach

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-21 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 19:30 paravirt_ops.safe_halt vs .halt? Jeremy Fitzhardinge
2006-09-21 19:44 ` Chris Wright
2006-09-21 20:32   ` Jeremy Fitzhardinge
2006-09-21 20:58     ` Zachary Amsden

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).