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: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Wed, 4 May 2005 09:20:02 -0700
Delivery-date: Wed, 04 May 2005 16:19:40 +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: AcVQjv5aInVRvTa7RTetpwzJevoONgANOPXQ
Thread-topic: [Xen-ia64-devel] Parameters to hypercalls
Could you explain more clearly what you are trying
to do (using C or pseudo-C to explain) both in xenlinux and
Xen?  E.g. are you just passing the pointer or are
you trying to pass the struct the pointer is pointing
to or something else.?

If you are just passing the pointer, just leave it
in r32==in0 and Xen can grab it there.  Note however
that there are still some issues with passing
user addresses into Xen... it basically works
for small data items but larger ones (e.g. ones
that cross a page boundary) may not work.
Eddie is working on a pass-through-memory interface
for hypercalls which you may need, depending on
what you are trying to do.

If *op can be passed by value, that will be much
easier to implement/test right now.

Dan

> -----Original Message-----
> From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf 
> Of Haavard Bjerke
> Sent: Wednesday, May 04, 2005 3:52 AM
> To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-ia64-devel] Parameters to hypercalls
> 
> 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?
> 
> Thanks,
> Håvard
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel
> 

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

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