提交 fccf2725 编写于 作者: J Jim Fehlig

libxl: switch to using libxl_domain_create_restore from v4.4 API

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: NJim Fehlig <jfehlig@suse.com>
上级 70ac2461
...@@ -871,10 +871,11 @@ if test "$with_libxl" != "no" ; then ...@@ -871,10 +871,11 @@ if test "$with_libxl" != "no" ; then
fi fi
fi fi
# Until there is a need to use enhancements of libxl APIs such as # LIBXL_API_VERSION 4.4.0 introduced a new parameter to
# libxl_domain_create_restore and libxl_set_vcpuaffinity, stick with # libxl_domain_create_restore for specifying restore parameters.
# the APIs as defined in libxl API version 4.2.0. # The libxl driver will make use of this new parameter for specifying
LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040200" # the Xen migration stream version.
LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040400"
LIBS="$old_LIBS" LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS" CFLAGS="$old_CFLAGS"
......
...@@ -1028,6 +1028,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, ...@@ -1028,6 +1028,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
libxlDriverConfigPtr cfg; libxlDriverConfigPtr cfg;
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
libxl_asyncprogress_how aop_console_how; libxl_asyncprogress_how aop_console_how;
libxl_domain_restore_params params;
libxl_domain_config_init(&d_config); libxl_domain_config_init(&d_config);
...@@ -1115,8 +1116,11 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, ...@@ -1115,8 +1116,11 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
ret = libxl_domain_create_new(cfg->ctx, &d_config, ret = libxl_domain_create_new(cfg->ctx, &d_config,
&domid, NULL, &aop_console_how); &domid, NULL, &aop_console_how);
} else { } else {
libxl_domain_restore_params_init(&params);
ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid, 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); virObjectLock(vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册