WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: "Haavard Bjerke" <havard.bjerke@xxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] Parameters to hypercalls
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: DIscussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>