xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ming Liu <ming.aaron.liu@gmail.com>
To: xen-devel@lists.xensource.com
Subject: Question about region_base in xc_domain_restore of live migration
Date: Thu, 5 Jan 2012 09:55:12 -0500	[thread overview]
Message-ID: <DE20C7BF-2DC5-4E38-9848-FC91C92C5831@gmail.com> (raw)

Hi, 
I'm studying the details about the live migration. I encounter a question when I read the source codes in xc_domain_save.c.
The code is:
region_base = xc_map_foreign_bulk(xc_handle, dom, PORT_READ, pfn_type, pfn_err, batch)
When I see xc_map_foreign_bulk function, I find that it mmap region_base to an address that is :
addr = mmap(NULL, (unsigned long) num << PAGE_SHIFT, port, MAP_SHARED, xc_handle, 0)
>From the above codes, I can know that region_base has been mapped to a block of data which is the same as the size of all pages. 
After that, the there is another line of code:
rc = ioctl(xc_handle, IOCTL_PRIVCMD_MMAPBATCH_V2, &ioctlx)
Is this function used to map all machine page content to region_base?

What is the usage of region_base?
Thanks for your help. 

                 reply	other threads:[~2012-01-05 14:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=DE20C7BF-2DC5-4E38-9848-FC91C92C5831@gmail.com \
    --to=ming.aaron.liu@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).