[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Stack switching in a PV guest



Hi Jan 
 
 
 Furthermore, the guest's kernel stack wants to be switched via
 __HYPERVISOR_stack_switch, or else the next interrupt/exception
 would end up still using the old stack.
I think I've finally got my head round using HYPERVISOR_stack_switch. It seems to replace all my stack magic, and at least it's not crashing now.
 
However, I now have a different problem. I am running my context switch off of a single shot timer. When the timer fires Xen transfers control to my PV guest via the hypercall_callback.
 
The hypercall_callback handler stores the current CPU register file, however the stored rsp always points to the hypercall stack, not the stack that was active in my PV at the moment the timer event fired.
 
I need to store the PV stack pointer so I can recover it later when my scheduler activates it. I have looked back up the stack and I don't really see where my active stack pointer is. Any idea where I can get it?
 
Regards.
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.