[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 16:10, "Simon Martin" <smartin@xxxxxxxxxxxx> wrote:

>>I'm afraid I'm missing some context here. What is a "hypercall stack"?
> Hmm. When I look at the stack frame it's not what I expected, so I 
> assumed that the hypervisor was assigning a stack. Means I've got 
> another bug.
> 
>>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.
> Probably a knock on from the problem I am seeing above then. I've 
> searched around for examples of HYPERVISOR_stack_switch usage, but I 
> can't find anything. I can find the declaration and handler in the Xen 
> source and however no example of making it work. Is there anything you 
> can point me to to see how it was intended to be used?

As to the implementation - look for do_stack_switch() in
xen/arch/x86/x86_64/mm.c.

As for usage examples, see current Linux'es
{HYPERVISOR,MULTI}_stack_switch() in
arch/x86/include/asm/xen/hypercall.h or __switch_to() in
linux-2.6.18-xen.hg's arch/x86_64/kernel/process-xen.c.

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