aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-17 19:40:17 +0000
committerIan Campbell <ian.campbell@citrix.com>2011-02-17 19:40:17 +0000
commit51b85cf4a65e6022b2ee9bf6d5a16a0808abad80 (patch)
treef182497f0d6bb5d50838366ce7787aaca41b33cb
parenta9dd01431a799b6743193a75f4f1ce2fdfdb7296 (diff)
downloadxen-51b85cf4a65e6022b2ee9bf6d5a16a0808abad80.tar.gz
xen-51b85cf4a65e6022b2ee9bf6d5a16a0808abad80.tar.bz2
xen-51b85cf4a65e6022b2ee9bf6d5a16a0808abad80.zip
libxl: do slow resume after failed migration attempt
both of the current callers for libxl_domain_resume are calling after a migration has failed, one is failure to suspend on the sender and the other is failure to start on the destination, both leading to a resume attempt on the sender. However in the first case, failure to suspend, there is no guarantee that the guest has made it as far as the suspend hypercall and therefore the fast resume method, which frobs the hypercall return to indicate a cancelled suspend, cannot safely be used since it will corrupt %eax/%rax. For the second case, failure to start on destination, I don't think it really matters if the resume is fast or slow. Therefore always use the slow/uncooperative version of xc_domain_resume from libxl_domain_resume. This makes a PV domain which failed to suspend (e.g. because the core Linux PM infrastructure within the guest didn't allow it) recover gracefully. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/libxl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 990aa8aa24..5dd936fdc2 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -226,7 +226,7 @@ int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid)
rc = ERROR_NI;
goto out;
}
- if (xc_domain_resume(ctx->xch, domid, 1)) {
+ if (xc_domain_resume(ctx->xch, domid, 0)) {
LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
"xc_domain_resume failed for domain %u",
domid);