WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] save/restore: If ENABLE_LOGDIRTY fails, i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] save/restore: If ENABLE_LOGDIRTY fails, it may be because it is
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 May 2007 07:50:13 -0700
Delivery-date: Tue, 01 May 2007 07:49:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1178010986 -3600
# Node ID 1cfe47358f9f7eef158a97c77ca5031da0ce6ea5
# Parent  476efa5c9abf8634ab00cadb6a4bd4b7bbd2000b
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@xxxxxxxxx>
---
 tools/libxc/xc_domain_save.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff -r 476efa5c9abf -r 1cfe47358f9f tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Tue May 01 10:15:08 2007 +0100
+++ b/tools/libxc/xc_domain_save.c      Tue May 01 10:16:26 2007 +0100
@@ -880,8 +880,17 @@ int xc_domain_save(int xc_handle, int io
                                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 )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] save/restore: If ENABLE_LOGDIRTY fails, it may be because it is, Xen patchbot-unstable <=