All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Bosdonnat" <cbosdonnat@suse.com>
To: xen-devel@lists.xen.org
Cc: "Wei Liu" <wei.liu2@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Cédric Bosdonnat" <cbosdonnat@suse.com>
Subject: [PATCH] libxl: invert xc and domain model resume calls in xc_domain_resume()
Date: Mon, 28 Nov 2016 14:53:57 +0100	[thread overview]
Message-ID: <20161128135357.5543-1-cbosdonnat@suse.com> (raw)

Resume is sometimes silently failing for HVM guests. Getting the
xc_domain_resume() and libxl__domain_resume_device_model() in the
reverse order than what is in the suspend code fixes the problem.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
---
 tools/libxl/libxl_dom_suspend.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/libxl/libxl_dom_suspend.c b/tools/libxl/libxl_dom_suspend.c
index 0648919..3e29c01 100644
--- a/tools/libxl/libxl_dom_suspend.c
+++ b/tools/libxl/libxl_dom_suspend.c
@@ -456,12 +456,6 @@ int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel)
 {
     int rc = 0;
 
-    if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
-        LOGE(ERROR, "xc_domain_resume failed for domain %u", domid);
-        rc = ERROR_FAIL;
-        goto out;
-    }
-
     libxl_domain_type type = libxl__domain_type(gc, domid);
     if (type == LIBXL_DOMAIN_TYPE_INVALID) {
         rc = ERROR_FAIL;
@@ -477,6 +471,12 @@ int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel)
         }
     }
 
+    if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
+        LOGE(ERROR, "xc_domain_resume failed for domain %u", domid);
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
     if (!xs_resume_domain(CTX->xsh, domid)) {
         LOGE(ERROR, "xs_resume_domain failed for domain %u", domid);
         rc = ERROR_FAIL;
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

             reply	other threads:[~2016-11-28 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 13:53 Cédric Bosdonnat [this message]
2016-11-29  7:34 ` [PATCH] libxl: invert xc and domain model resume calls in xc_domain_resume() Wei Liu
2016-11-29  8:47   ` Juergen Gross
2016-11-29 19:15     ` Stefano Stabellini
2016-12-01 13:29       ` Wei Liu
2016-12-07 11:14 ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161128135357.5543-1-cbosdonnat@suse.com \
    --to=cbosdonnat@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.