xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@suse.com>
To: libvir-list@redhat.com
Cc: andrew.cooper3@citrix.com, Jim Fehlig <jfehlig@suse.com>,
	wei.liu2@citrix.com, xen-devel@lists.xen.org
Subject: [PATCH 1/3] libxl: switch to using libxl_domain_create_restore from v4.4 API
Date: Mon,  2 May 2016 19:01:17 -0600	[thread overview]
Message-ID: <1462237279-6954-2-git-send-email-jfehlig__785.494261845265$1462237386$gmane$org@suse.com> (raw)
In-Reply-To: <1462237279-6954-1-git-send-email-jfehlig@suse.com>

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             | 9 +++++----
 src/libxl/libxl_domain.c | 6 +++++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 88e2e20..0da0f75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -875,10 +875,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"
 
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 14a900c..32ad946 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -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);
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

       reply	other threads:[~2016-05-03  1:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1462237279-6954-1-git-send-email-jfehlig@suse.com>
2016-05-03  1:01 ` Jim Fehlig [this message]
2016-05-03  1:01 ` [PATCH 2/3] libxl: support Xen migration stream V2 in save/restore Jim Fehlig
2016-05-03  1:01 ` [PATCH 3/3] libxl: support migration stream V2 in migration Jim Fehlig
2016-05-03 12:34 ` [PATCH 0/3] libxl: support Xen migration stream V2 Andrew Cooper
2016-05-03 13:19 ` Wei Liu
     [not found] ` <20160503131954.GH14150@citrix.com>
2016-05-10  0:20   ` Jim Fehlig
2016-05-10 10:51 ` [libvirt] " Ján Tomko
     [not found] ` <20160510105125.GB15123@dnr>
2016-05-10 20:32   ` Jim Fehlig
     [not found] ` <1462237279-6954-2-git-send-email-jfehlig@suse.com>
2016-05-03 13:19   ` [PATCH 1/3] libxl: switch to using libxl_domain_create_restore from v4.4 API Wei Liu
2016-05-11  6:01   ` Olaf Hering
2016-05-12  0:04     ` Jim Fehlig
     [not found]     ` <5733C8A8.6020404@suse.com>
2016-05-12  7:29       ` [libvirt] " Olaf Hering
2016-05-12 15:18         ` Jim Fehlig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1462237279-6954-2-git-send-email-jfehlig__785.494261845265$1462237386$gmane$org@suse.com' \
    --to=jfehlig@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=libvir-list@redhat.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).