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

Re: [Xen-devel] Confusion about copy_to/from_guest



On 26/04/2010 03:32, "Tej" <bewith.tej@xxxxxxxxx> wrote:

> Now passing the list_head from kernel using hypercall. Now how do I
> copy the element between kernel and hypervisor.
> 
> 1. copy_from_guest(hyp_list_head, arg, 1) or
> copy_from_guest(hyp_list_head, arg, <num_of_elements_list>)
> 2. copy_to_guest(arg, hyp_list_head, 1) or copy_to_guest(arg,
> hyp_list_head, <num of element in list>)

The first of these. Copy_{to,from}_guest can copy arrays of structures, but
since this is a linked structure you'd have to do the copy one element at a
time.

> 2nd question:
> I did first one, but first element of list was not accessible in
> hypervisor space, why?

Well, if you are really only copying the list_head, the above should work.

 -- Keir



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


 


Rackspace

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