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

RE: [Xen-ia64-devel] Parameters to hypercalls


  • To: "Haavard Bjerke" <havard.bjerke@xxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Sun, 8 May 2005 11:33:27 +0800
  • Delivery-date: Sun, 08 May 2005 03:32:58 +0000
  • List-id: DIscussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcVQjvrRlVWEG74aTMqYEZNcWrJwRAC7ylWg
  • Thread-topic: [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


 


Rackspace

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