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