Thread (4 messages) 4 messages, 3 authors, 2006-09-21

Re: paravirt_ops.safe_halt vs .halt?

From: Zachary Amsden <hidden>
Date: 2006-09-21 20:58:31

Jeremy Fitzhardinge wrote:
Chris Wright wrote:
  
quoted
* Jeremy Fitzhardinge (jeremy@goop.org) wrote:
  
    
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help