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

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



>>> On 20.12.13 at 15:12, "Simon Martin" <smartin@xxxxxxxxxxxx> wrote:
> 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'm afraid I'm missing some context here. What is a "hypercall stack"?

> 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?

The callback gets invoked much like other exceptions would be, with
a normal exception entry stack frame. The stack pointer would be
there (RCX, R11, RIP, CS, EFLAGS, RSP, SS) just as normal.

Jan


_______________________________________________
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®.