From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 1/2] libxl: don't try to rename dm save file for PVH
Date: Mon, 20 Mar 2017 19:03:10 +0100 [thread overview]
Message-ID: <20170320180311.5091-2-vkuznets@redhat.com> (raw)
In-Reply-To: <20170320180311.5091-1-vkuznets@redhat.com>
Guests with LIBXL_DEVICE_MODEL_VERSION_NONE don't have a device model
running so there is no save file to rename.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
tools/libxl/libxl_create.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 25389e1..95fd96b 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1664,12 +1664,16 @@ static void domain_soft_reset_cb(libxl__egc *egc,
goto error;
}
- savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d", dds->domid);
- restorefile = GCSPRINTF(LIBXL_DEVICE_MODEL_RESTORE_FILE".%d", dds->domid);
- rc = rename(savefile, restorefile);
- if (rc) {
- LOGD(ERROR, dds->domid, "failed to rename dm save file.");
- goto error;
+ if (cdcs->dcs.guest_config->b_info.device_model_version !=
+ LIBXL_DEVICE_MODEL_VERSION_NONE) {
+ savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d", dds->domid);
+ restorefile = GCSPRINTF(LIBXL_DEVICE_MODEL_RESTORE_FILE".%d",
+ dds->domid);
+ rc = rename(savefile, restorefile);
+ if (rc) {
+ LOGD(ERROR, dds->domid, "failed to rename dm save file.");
+ goto error;
+ }
}
initiate_domain_create(egc, &cdcs->dcs);
--
2.9.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-20 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 18:03 [PATCH 0/2] libxl: fix soft reset for PVHv2 guests Vitaly Kuznetsov
2017-03-20 18:03 ` Vitaly Kuznetsov [this message]
2017-03-21 17:03 ` [PATCH 1/2] libxl: don't try to rename dm save file for PVH Wei Liu
2017-03-20 18:03 ` [PATCH 2/2] libxl: preserve console tty across soft reset Vitaly Kuznetsov
2017-03-21 17:03 ` Wei Liu
2017-03-22 11:30 ` [PATCH 0/2] libxl: fix soft reset for PVHv2 guests Wei Liu
2017-03-22 12:06 ` Vitaly Kuznetsov
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=20170320180311.5091-2-vkuznets@redhat.com \
--to=vkuznets@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).