From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 3/6] tools/libx{l, c}: Remove XC_DEVICE_MODEL_RESTORE_FILE Date: Mon, 20 Jul 2015 11:37:56 +0100 Message-ID: <1437388679-16468-4-git-send-email-andrew.cooper3@citrix.com> References: <1437388679-16468-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1437388679-16468-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Ian Jackson , Ian Campbell , Wei Liu List-Id: xen-devel@lists.xenproject.org All handling of device model files is now at the libxl level. Remove XC_DEVICE_MODEL_RESTORE_FILE and introduce LIBXL_DEVICE_MODEL_RESTORE_FILE in its place. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/include/xenguest.h | 8 -------- tools/libxl/libxl.c | 2 +- tools/libxl/libxl_create.c | 2 +- tools/libxl/libxl_internal.h | 1 + tools/libxl/libxl_stream_read.c | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index 231ec6e..9772576 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -135,14 +135,6 @@ int xc_domain_restore2(xc_interface *xch, int io_fd, uint32_t dom, unsigned int hvm, unsigned int pae, int superpages, int checkpointed_stream, struct restore_callbacks *callbacks); -/** - * xc_domain_restore writes a file to disk that contains the device - * model saved state. - * The pathname of this file is XC_DEVICE_MODEL_RESTORE_FILE; The domid - * of the new domain is automatically appended to the filename, - * separated by a ".". - */ -#define XC_DEVICE_MODEL_RESTORE_FILE "/var/lib/xen/qemu-resume" /** * This function will create a domain for a paravirtualized Linux diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 3fe1b99..c13aa8b 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1695,7 +1695,7 @@ static void devices_destroy_cb(libxl__egc *egc, rc = libxl__remove_file(gc, libxl__device_model_savefile(gc, domid)); if (rc < 0) goto out; rc = libxl__remove_file(gc, - GCSPRINTF(XC_DEVICE_MODEL_RESTORE_FILE".%u", domid)); + GCSPRINTF(LIBXL_DEVICE_MODEL_RESTORE_FILE".%u", domid)); if (rc < 0) goto out; rc = libxl__ev_child_fork(gc, &dis->destroyer, domain_destroy_domid_cb); diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 5b4d333..86d1181 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1083,7 +1083,7 @@ static void domcreate_stream_done(libxl__egc *egc, if (info->type == LIBXL_DOMAIN_TYPE_HVM) { state->saved_state = GCSPRINTF( - XC_DEVICE_MODEL_RESTORE_FILE".%d", domid); + LIBXL_DEVICE_MODEL_RESTORE_FILE".%d", domid); } out: diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 4ab564a..20f4cde 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -90,6 +90,7 @@ /* QEMU may be slow to load and start due to a bug in Linux where the I/O * subsystem sometime produce high latency under load. */ #define LIBXL_DEVICE_MODEL_START_TIMEOUT 60 +#define LIBXL_DEVICE_MODEL_RESTORE_FILE "/var/lib/xen/qemu-resume" /* .$domid */ #define LIBXL_STUBDOM_START_TIMEOUT 30 #define LIBXL_QEMU_BODGE_TIMEOUT 2 #define LIBXL_XENCONSOLE_LIMIT 1048576 diff --git a/tools/libxl/libxl_stream_read.c b/tools/libxl/libxl_stream_read.c index 0535e7f..94247b7 100644 --- a/tools/libxl/libxl_stream_read.c +++ b/tools/libxl/libxl_stream_read.c @@ -592,7 +592,7 @@ static void write_emulator_blob(libxl__egc *egc, } emu_hdr = rec->body; - sprintf(path, XC_DEVICE_MODEL_RESTORE_FILE".%u", dcs->guest_domid); + sprintf(path, LIBXL_DEVICE_MODEL_RESTORE_FILE".%u", dcs->guest_domid); assert(stream->emu_carefd == NULL); libxl__carefd_begin(); -- 1.7.10.4