[Lguest] Passing pointers to/from hypercalls.

Rusty Russell rusty at rustcorp.com.au
Mon Mar 10 12:59:40 EST 2008


On Friday 07 March 2008 08:11:19 Sujit Sanjeev wrote:
> Hello,
>
> I want to add a new hypercall which takes in character arrays as input. The
> hcall() implementation in lguest.h
> suggests that the arguments are passed in registers (EAX, EDX, EBX, ECX) as
> unsigned long values.
> How do I pass char arrays as argument to a hcall() and receive the result
> also as char arrays.

Hi Sujit,

Look at how we do it in hypercalls.c (eg. LHCALL_SHUTDOWN): the answer is for 
the guest to use __pa() and the host to use lgread.

Hope that helps!
Rusty.



More information about the Lguest mailing list