projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e7c135
)
hvm, save/restore: Skip page batches which contain no valid pages.
author
Keir Fraser
<keir.fraser@citrix.com>
Tue, 23 Sep 2008 16:11:33 +0000
(17:11 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Tue, 23 Sep 2008 16:11:33 +0000
(17:11 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/libxc/xc_domain_save.c
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_domain_save.c
b/tools/libxc/xc_domain_save.c
index c6e1c23c32ddc6394610865be152c68043506551..c1ced27d98f1b19abe50bd45fb1c1ce1c931c3ad 100644
(file)
--- a/
tools/libxc/xc_domain_save.c
+++ b/
tools/libxc/xc_domain_save.c
@@
-1115,7
+1115,20
@@
int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
goto out;
}
- if ( !hvm )
+ if ( hvm )
+ {
+ /* Look for and skip completely empty batches. */
+ for ( j = 0; j < batch; j++ )
+ if ( (pfn_type[j] & XEN_DOMCTL_PFINFO_LTAB_MASK) !=
+ XEN_DOMCTL_PFINFO_XTAB )
+ break;
+ if ( j == batch )
+ {
+ munmap(region_base, batch*PAGE_SIZE);
+ continue; /* bail on this batch: no valid pages */
+ }
+ }
+ else
{
/* Get page types */
for ( j = 0; j < batch; j++ )