xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Tej <bewith.tej@gmail.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Confusion about copy_to/from_guest
Date: Mon, 26 Apr 2010 06:33:08 +0100	[thread overview]
Message-ID: <C7FAE424.12628%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <h2gf1c9d251004251932s19c2f51ofb422ee27c366fca@mail.gmail.com>

On 26/04/2010 03:32, "Tej" <bewith.tej@gmail.com> 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

  reply	other threads:[~2010-04-26  5:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26  2:32 Confusion about copy_to/from_guest Tej
2010-04-26  5:33 ` Keir Fraser [this message]
2010-04-27 11:52   ` Tej

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C7FAE424.12628%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=bewith.tej@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).