tools/libx{l, c}: Remove the toolstack_{save, restore} callbacks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 Jul 2015 10:37:55 +0000 (11:37 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 28 Jul 2015 10:11:52 +0000 (11:11 +0100)
Update the libxc spec to indicate more sternly that TOOLSTACK records
should no longer be used.

Also, trim further toolstack infrastructure which should have gone in
c/s 39bf4e9 "tools/libxl: Drop all knowledge of toolstack callbacks"

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>
docs/specs/libxc-migration-stream.pandoc
tools/libxc/include/xenguest.h
tools/libxl/libxl_internal.h
tools/libxl/libxl_save_callout.c

index 68fa513d7ea1dd83f43f1e8b0fd16c92eb26c5eb..9d8f17be20bf76b43e226f3a04d68a0fc6844652 100644 (file)
@@ -219,7 +219,7 @@ type         0x00000000: END
 
              0x0000000A: HVM_PARAMS
 
-             0x0000000B: TOOLSTACK
+             0x0000000B: TOOLSTACK (deprecated)
 
              0x0000000C: X86_PV_VCPU_MSRS
 
@@ -540,17 +540,15 @@ param value      Parameter value.
 
 \clearpage
 
-TOOLSTACK
----------
+TOOLSTACK (deprecated)
+----------------------
+
+> *This record was only present for transitionary purposes during
+>  development.  It is should not be used.*
 
 An opaque blob provided by and supplied to the higher layers of the
 toolstack (e.g., libxl) during save and restore.
 
-> This is only temporary -- the intention is the toolstack takes care
-> of this itself.  This record is only present for early development
-> purposes and will be removed before submissions, along with changes
-> to libxl which cause libxl to handle this data itself.
-
      0     1     2     3     4     5     6     7 octet
     +------------------------+------------------------+
     | data                                            |
index e95af54dac3bf6868132f9f0f2d67c864800862c..231ec6e6815fd1e12ee624e40c295c5a0b1de980 100644 (file)
@@ -67,14 +67,6 @@ struct save_callbacks {
     /* Enable qemu-dm logging dirty pages to xen */
     int (*switch_qemu_logdirty)(int domid, unsigned enable, void *data); /* HVM only */
 
-    /* Save toolstack specific data
-     * @param buf the buffer with the data to be saved
-     * @param len the length of the buffer
-     * The callee allocates the buffer, the caller frees it (buffer must
-     * be free'able).
-     */
-    int (*toolstack_save)(uint32_t domid, uint8_t **buf, uint32_t *len, void *data);
-
     /* to be provided as the last argument to each callback function */
     void* data;
 };
@@ -98,10 +90,6 @@ int xc_domain_save2(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_ite
 
 /* callbacks provided by xc_domain_restore */
 struct restore_callbacks {
-    /* callback to restore toolstack specific data */
-    int (*toolstack_restore)(uint32_t domid, const uint8_t *buf,
-            uint32_t size, void* data);
-
     /* A checkpoint record has been found in the stream.
      * returns: */
 #define XGR_CHECKPOINT_ERROR    0 /* Terminate processing */
index f2466dc399534c8ffa5448a783f729c8eaa3fdb5..ea6c73f602425599bbdd4acc0f0bbd405fbd0631 100644 (file)
@@ -2761,7 +2761,6 @@ typedef struct libxl__save_helper_state {
     libxl__ev_fd readable;
     libxl__ev_child child;
     const char *stdin_what, *stdout_what;
-    FILE *toolstack_data_file;
 
     libxl__egc *egc; /* valid only for duration of each event callback;
                       * is here in this struct for the benefit of the
index f2ce868c1e1030224199993d10d0d455ed94221e..3af99af2e17d2370c28d50b899cd601de83ae64e 100644 (file)
@@ -70,7 +70,6 @@ void libxl__xc_domain_restore(libxl__egc *egc, libxl__domain_create_state *dcs,
     shs->completion_callback = libxl__xc_domain_restore_done;
     shs->caller_state = dcs;
     shs->need_results = 1;
-    shs->toolstack_data_file = 0;
 
     run_helper(egc, shs, "--restore-domain", restore_fd, 0, 0,
                argnums, ARRAY_SIZE(argnums));
@@ -333,7 +332,6 @@ static void helper_done(libxl__egc *egc, libxl__save_helper_state *shs)
     libxl__carefd_close(shs->pipes[0]);  shs->pipes[0] = 0;
     libxl__carefd_close(shs->pipes[1]);  shs->pipes[1] = 0;
     assert(!libxl__save_helper_inuse(shs));
-    if (shs->toolstack_data_file) fclose(shs->toolstack_data_file);
 
     shs->egc = egc;
     shs->completion_callback(egc, shs->caller_state,