From: Andrew Cooper Date: Fri, 20 Dec 2019 11:58:03 +0000 (+0000) Subject: tools/libxl: Provide a static_data_done callback for domain restore X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~155 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c1a552ec7fcd95a2c5af0da105c58a2773944cd7;p=xen.git tools/libxl: Provide a static_data_done callback for domain restore 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 Acked-by: Ian Jackson --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 8614a2c241..baed817a96 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -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) { diff --git a/tools/libxl/libxl_save_msgs_gen.pl b/tools/libxl/libxl_save_msgs_gen.pl index 831a15e0bb..93dc252370 100755 --- a/tools/libxl/libxl_save_msgs_gen.pl +++ b/tools/libxl/libxl_save_msgs_gen.pl @@ -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