aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
diff options
context:
space:
mode:
authoriap10@firebug.cl.cam.ac.uk <iap10@firebug.cl.cam.ac.uk>2005-09-07 02:31:24 +0000
committeriap10@firebug.cl.cam.ac.uk <iap10@firebug.cl.cam.ac.uk>2005-09-07 02:31:24 +0000
commitbf753c8c6b7a8d171365c8eaa23826dc057dd3c5 (patch)
tree592ac7df13d67192cb327280ab00a5b8715a8cdb /tools/libxc
parentd3733b34b55ee1499dc5ccdbeef594a2811b2ca4 (diff)
downloadxen-bf753c8c6b7a8d171365c8eaa23826dc057dd3c5.tar.gz
xen-bf753c8c6b7a8d171365c8eaa23826dc057dd3c5.tar.bz2
xen-bf753c8c6b7a8d171365c8eaa23826dc057dd3c5.zip
Extend save/restore interface to cope with domains >4GB by adding a level of indirection.
Signed-off-by: ian@xensource.com
Diffstat (limited to 'tools/libxc')
-rw-r--r--tools/libxc/xc_linux_save.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c
index c9af7b0d3b..af32db7791 100644
--- a/tools/libxc/xc_linux_save.c
+++ b/tools/libxc/xc_linux_save.c
@@ -419,6 +419,7 @@ int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters,
unsigned long page[1024];
/* A copy of the pfn-to-mfn table frame list. */
+ unsigned long *live_pfn_to_mfn_frame_list_list = NULL;
unsigned long *live_pfn_to_mfn_frame_list = NULL;
unsigned long pfn_to_mfn_frame_list[1024];
@@ -506,11 +507,20 @@ int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters,
goto out;
}
- /* the pfn_to_mfn_frame_list fits in a single page */
+ live_pfn_to_mfn_frame_list_list = xc_map_foreign_range(xc_handle, dom,
+ PAGE_SIZE, PROT_READ,
+ live_shinfo->arch.pfn_to_mfn_frame_list_list);
+
+ if (!live_pfn_to_mfn_frame_list_list){
+ ERR("Couldn't map pfn_to_mfn_frame_list_list");
+ goto out;
+ }
+
live_pfn_to_mfn_frame_list =
- xc_map_foreign_range(xc_handle, dom,
- PAGE_SIZE, PROT_READ,
- live_shinfo->arch.pfn_to_mfn_frame_list );
+ xc_map_foreign_batch(xc_handle, dom,
+ PROT_READ,
+ live_pfn_to_mfn_frame_list_list,
+ (nr_pfns+(1024*1024)-1)/(1024*1024) );
if (!live_pfn_to_mfn_frame_list){
ERR("Couldn't map pfn_to_mfn_frame_list");