|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
RE: [Xen-ia64-devel] Parameters to hypercalls
>-----Original Message-----
>From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Haavard Bjerke
>Sent: Wednesday, May 04, 2005 5:52 PM
>
>I want to pass a parameter with the evtchn_op hypercall, which is a
pointer, *op. How
>do I do this? Can I just load it in a register, say r3, when issuing
the hypercall and
>then store from r3 in the hypervisor, like this:
>
>xenlinux:
> /* load pointer to r3 */
> asm volatile("ld8 r3=%0;"
> :: "m" (op)
> : "r3");
>
> /* hypercall */
> asm volatile("mov r2=%0; break %1;"
> :: "i" (HYPERCALL_EVTCHN_OP), "i" (BREAKIMM)
> : "r2", "r8", "memory");
>
>hypervisor:
> /* get pointer from r3 */
> asm volatile("st8 %0=r3;"
> : "=m" (op)
> :: "r3");
>
>This doesn't work, why?
Hi, Haavard,
If you want to access r3 (scratch) in HV, you should jump to
pt_regs/xen_regs located at bottom of memory stack of current
exec_domain, and then get r3 value saved in that structure. Machine r3
may have already been modified by HV.
Thanks,
Kevin
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
|
|
|
|