From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ming Liu Subject: Question about region_base in xc_domain_restore of live migration Date: Thu, 5 Jan 2012 09:55:12 -0500 Message-ID: Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.