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] Fix domain save when guest is in S3.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix domain save when guest is in S3.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 06 Dec 2008 04:20:48 -0800
Delivery-date: Sat, 06 Dec 2008 04:24:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228492462 0
# Node ID cc82d54bedfd20442a1604907ed65c5166397c43
# Parent  d206692cbcbe33305afc4879a4b3ece44a8aba93
Fix domain save when guest is in S3.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    3 ++-
 tools/xcutils/xc_save.c                 |   12 +++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff -r d206692cbcbe -r cc82d54bedfd tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 05 15:24:12 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 05 15:54:22 2008 +0000
@@ -517,7 +517,8 @@ class XendDomainInfo:
         # HVM domain shuts itself down only if it has PV drivers
         if self.info.is_hvm():
             hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
-            if not hvm_pvdrv:
+            hvm_s_state = xc.hvm_get_param(self.domid, HVM_PARAM_ACPI_S_STATE)
+            if not hvm_pvdrv or hvm_s_state != 0:
                 code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
                 log.info("HVM save:remote shutdown dom %d!", self.domid)
                 xc.domain_shutdown(self.domid, code)
diff -r d206692cbcbe -r cc82d54bedfd tools/xcutils/xc_save.c
--- a/tools/xcutils/xc_save.c   Fri Dec 05 15:24:12 2008 +0000
+++ b/tools/xcutils/xc_save.c   Fri Dec 05 15:54:22 2008 +0000
@@ -166,18 +166,12 @@ static int suspend(void)
 {
     unsigned long sx_state = 0;
 
-    /* Nothing to do if the guest is in an ACPI sleep state. */
+    /* Cannot notify guest to shut itself down if it's in ACPI sleep state. */
     if (si.flags & XCFLAGS_HVM)
         xc_get_hvm_param(si.xc_fd, si.domid,
                          HVM_PARAM_ACPI_S_STATE, &sx_state);
-    if (sx_state != 0) {
-        /* notify xend that it can do device migration */
-        printf("suspended\n");
-        fflush(stdout);
-        return 1;
-    }
-
-    if (si.suspend_evtchn >= 0)
+
+    if ((sx_state == 0) && (si.suspend_evtchn >= 0))
         return evtchn_suspend();
 
     return compat_suspend();

_______________________________________________
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] Fix domain save when guest is in S3., Xen patchbot-unstable <=