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-devel

[Xen-devel] [PATCH 5 of 5] Do not set suspend return value unless SIF_RE

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 5 of 5] Do not set suspend return value unless SIF_RESUMABLE is set
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Fri, 12 Jan 2007 15:03:12 -0700
Delivery-date: Fri, 12 Jan 2007 15:09:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1168642987@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168642944 28800
# Node ID 4fc2fde1b3737554edd795e65701292d8320405d
# Parent  8c3139592f4d99d7ce1ca4e4e00792b00fc323b4
Do not set suspend return value unless SIF_RESUMABLE is set.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r 8c3139592f4d -r 4fc2fde1b373 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Fri Jan 12 15:02:24 2007 -0800
+++ b/tools/libxc/xc_linux_restore.c    Fri Jan 12 15:02:24 2007 -0800
@@ -690,11 +690,13 @@ int xc_linux_restore(int xc_handle, int 
         ERROR("Suspend record frame number is bad");
         goto out;
     }
-    /* HYPERVISOR_suspend returns 1 to let guest know it should reconnect */
-    ctxt.user_regs.eax = 1;
     ctxt.user_regs.edx = mfn = p2m[pfn];
     start_info = xc_map_foreign_range(
         xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, mfn);
+    if (start_info->flags & SIF_RESUMABLE) {
+       /* HYPERVISOR_suspend returns 1 to let guest know it should reconnect */
+       ctxt.user_regs.eax = 1;
+    }
     start_info->nr_pages    = max_pfn;
     start_info->shared_info = shared_info_frame << PAGE_SHIFT;
     start_info->flags       = 0;

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