mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
dc8f50b150
commit
bb4adad4e1
1 file changed
+11
-2
@@ -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 )
|
||||
|
||||