tools/libxl: Provide a static_data_done callback for domain restore
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Dec 2019 11:58:03 +0000 (11:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 May 2020 16:33:03 +0000 (17:33 +0100)
This will be needed shortly to provide backwards compatiblity for migration
streams which do not have CPUID information contained within them.

No functional change yet.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_create.c
tools/libxl/libxl_save_msgs_gen.pl

index 8614a2c2413871b86b3e640d7483c26c73f40312..baed817a962c55c7d10f9f7c1b30f22999fc3122 100644 (file)
@@ -1358,6 +1358,7 @@ static void domcreate_bootloader_done(libxl__egc *egc,
     dcs->srs.dcs = dcs;
 
     /* Restore */
+    callbacks->static_data_done = libxl__srm_callout_callback_static_data_done;
     callbacks->restore_results = libxl__srm_callout_callback_restore_results;
 
     /* COLO only supports HVM now because it does not work very
@@ -1427,6 +1428,17 @@ static void libxl__colo_restore_setup_done(libxl__egc *egc,
     libxl__stream_read_start(egc, &dcs->srs);
 }
 
+int libxl__srm_callout_callback_static_data_done(void *user)
+{
+    libxl__save_helper_state *shs = user;
+    libxl__domain_create_state *dcs = shs->caller_state;
+    STATE_AO_GC(dcs->ao);
+
+    /* Nothing to do (yet). */
+
+    return 0;
+}
+
 void libxl__srm_callout_callback_restore_results(xen_pfn_t store_mfn,
           xen_pfn_t console_mfn, void *user)
 {
index 831a15e0bb87f37c9661a58e7194b98bc13ef9b3..93dc252370ce2019ef2b7cb7264e7678a623cb64 100755 (executable)
@@ -29,6 +29,7 @@ our @msgs = (
     [ 'srcxA',  "wait_checkpoint", [] ],
     [ 'scxA',   "switch_qemu_logdirty",  [qw(uint32_t domid
                                           unsigned enable)] ],
+    [ 'rcxW',   "static_data_done",      [] ],
     [ 'rcx',    "restore_results",       ['xen_pfn_t', 'store_gfn',
                                           'xen_pfn_t', 'console_gfn'] ],
     [ 'srW',    "complete",              [qw(int retval