hvm, save/restore: Skip page batches which contain no valid pages.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-09-23 17:11:33 +01:00
1 parent 0e7c1355bc
commit c2c1029070
1 file changed
+14 -1
+14 -1
View File
@@ -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++ )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.