save/restore: If ENABLE_LOGDIRTY fails, it may be because it is

already active. To find out, attempt to disable and then reenable the
mode.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-05-01 10:16:26 +01:00
1 parent dc8f50b150
commit bb4adad4e1
1 file changed
+11 -2
+11 -2
View File
@@ -880,8 +880,17 @@ int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
NULL, 0, NULL, 0, NULL) < 0 )
{
ERROR("Couldn't enable shadow mode");
goto out;
/* log-dirty already enabled? There's no test op,
so attempt to disable then reenable it */
if ( !(xc_shadow_control(xc_handle, dom, XEN_DOMCTL_SHADOW_OP_OFF,
NULL, 0, NULL, 0, NULL) >= 0 &&
xc_shadow_control(xc_handle, dom,
XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY,
NULL, 0, NULL, 0, NULL) >= 0) )
{
ERROR("Couldn't enable shadow mode");
goto out;
}
}
if ( hvm )
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.