Question about region_base in xc_domain_restore of live migration
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)
Quoted 1 line
From the above codes, I can know that
region_basehas 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.