From a046a6dc893165068ee4e6692b152da828dc1970 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 5 Dec 2008 15:54:22 +0000 Subject: Fix domain save when guest is in S3. Signed-off-by: Keir Fraser --- tools/xcutils/xc_save.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tools/xcutils') diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c index 9ece499f04..d11543e08d 100644 --- a/tools/xcutils/xc_save.c +++ b/tools/xcutils/xc_save.c @@ -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(); -- cgit v1.2.3