]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: switch to using libxl_domain_create_restore from v4.4 API
authorJim Fehlig <jfehlig@suse.com>
Fri, 29 Apr 2016 03:08:28 +0000 (21:08 -0600)
committerJim Fehlig <jfehlig@suse.com>
Tue, 10 May 2016 20:23:37 +0000 (14:23 -0600)
In LIBXL_API_VERSION 0x040400, the libxl_domain_create_restore API
gained a parameter for specifying restore parameters. Switch to
using version 0x040400, which will be useful in a subsequent commit
to specify the Xen migration stream version when restoring.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
configure.ac
src/libxl/libxl_domain.c

index d19c1a98664d3dc90fab645abf6e08ecea929ca2..3e0d7de63c800361ab24a9c7e08185a582cffe27 100644 (file)
@@ -871,10 +871,11 @@ if test "$with_libxl" != "no" ; then
     fi
 fi
 
-# Until there is a need to use enhancements of libxl APIs such as
-# libxl_domain_create_restore and libxl_set_vcpuaffinity, stick with
-# the APIs as defined in libxl API version 4.2.0.
-LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040200"
+# LIBXL_API_VERSION 4.4.0 introduced a new parameter to
+# libxl_domain_create_restore for specifying restore parameters.
+# The libxl driver will make use of this new parameter for specifying
+# the Xen migration stream version.
+LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040400"
 LIBS="$old_LIBS"
 CFLAGS="$old_CFLAGS"
 
index 14a900c9f9fef5f3d33ef9fe8a1d6cbf73e0b749..32ad946d4844ea3bd1cc9707f2a141912763295f 100644 (file)
@@ -1028,6 +1028,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
     libxlDriverConfigPtr cfg;
     virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
     libxl_asyncprogress_how aop_console_how;
+    libxl_domain_restore_params params;
 
     libxl_domain_config_init(&d_config);
 
@@ -1115,8 +1116,11 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
         ret = libxl_domain_create_new(cfg->ctx, &d_config,
                                       &domid, NULL, &aop_console_how);
     } else {
+        libxl_domain_restore_params_init(&params);
         ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
-                                          restore_fd, NULL, &aop_console_how);
+                                          restore_fd, &params, NULL,
+                                          &aop_console_how);
+        libxl_domain_restore_params_dispose(&params);
     }
     virObjectLock(vm);