From: Isaku Yamahata Date: Thu, 25 Sep 2008 02:47:53 +0000 (+0900) Subject: [IA64] xc_domain_save: Do not poll-wait for guest to shutdown. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14108 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9dc665723cca5312bd99c0813c72ff53505c5d0a;p=xen.git [IA64] xc_domain_save: Do not poll-wait for guest to shutdown. This patch is ia64 counter part of 18452:59904b180078. Signed-off-by: Isaku Yamahata --- diff --git a/tools/libxc/ia64/xc_ia64_linux_save.c b/tools/libxc/ia64/xc_ia64_linux_save.c index 940b30ca58..f153aaa6b4 100644 --- a/tools/libxc/ia64/xc_ia64_linux_save.c +++ b/tools/libxc/ia64/xc_ia64_linux_save.c @@ -56,43 +56,18 @@ static int suspend_and_state(int (*suspend)(void), int xc_handle, int io_fd, int dom, xc_dominfo_t *info) { - int i = 0; - if (!(*suspend)()) { ERROR("Suspend request failed"); return -1; } -retry: - - if (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) { + if ( (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) || + !info->shutdown || (info->shutdown_reason != SHUTDOWN_suspend) ) { ERROR("Could not get domain info"); return -1; } - if (info->shutdown && info->shutdown_reason == SHUTDOWN_suspend) - return 0; // success - - if (info->paused) { - // try unpausing domain, wait, and retest - xc_domain_unpause(xc_handle, dom); - - ERROR("Domain was paused. Wait and re-test."); - usleep(10000); // 10ms - - goto retry; - } - - - if(++i < 100) { - ERROR("Retry suspend domain."); - usleep(10000); // 10ms - goto retry; - } - - ERROR("Unable to suspend domain."); - - return -1; + return 0; } static inline int