]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libx{l, c}: Remove XC_DEVICE_MODEL_RESTORE_FILE
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 Jul 2015 10:37:56 +0000 (11:37 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jul 2015 10:11:52 +0000 (11:11 +0100)
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 <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/include/xenguest.h
tools/libxl/libxl.c
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_stream_read.c

index 231ec6e6815fd1e12ee624e40c295c5a0b1de980..9772576696d771c63a503bcb96cc9b6b6ecf2ccc 100644 (file)
@@ -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
index ff0d616637471225460f4cb5df3e55536a2cdc93..614ca33c3a73dbd2e1edb22fb370e3dd747cee5a 100644 (file)
@@ -1671,7 +1671,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);
index 0294844ac430a1dbe15839543cb047f58f8129c7..4f2f50b9bd006e08009eabb18bfa788bf19cee0f 100644 (file)
@@ -1102,7 +1102,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:
index ea6c73f602425599bbdd4acc0f0bbd405fbd0631..89563a43efef448d7a9bdc63f74704301b394900 100644 (file)
@@ -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
index 32a35518e0de9fd18ef88a48b256676e2e3c5755..56637e2e419e0237708e648428cafb4e396e0f76 100644 (file)
@@ -593,7 +593,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();