|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] Re: lazy context switching
 
On 25 Aug 2005, at 22:55, Hollis Blanchard wrote:
 Later on, if it turns out we are switching domains, we save/restore 
all the
state we can, then return to the exception handler which saves the old 
set of
nonvolatiles and loads the new one. Until that point, some domain 
state is
spread arbitrarily across our stack.
 That means that context_switch() cannot actually save all of @prev's 
state to
memory (and neither can __sync_lazy_execstate()) -- only by returning 
all the
way to assembly can we accomplish that.
Thoughts?
  
 What you need is a synchronisation point, visible to other CPUs, beyond 
which things like DOM0_GETVCPUCONTEXT can be sure to read consistent 
current state for the descheduled vcpu. See domain_sleep_sync() for the 
current way we ensure that state is committed to memory.
 If you have a lot of register state, have you considered maintaining a 
Xen stack per VCPU? The context-switch interface already supports this, 
for ia64.
 -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    | 
  
  
    |   | 
    |