]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: drop support for Xen < 4.6
authorJim Fehlig <jfehlig@suse.com>
Tue, 27 Mar 2018 17:50:14 +0000 (11:50 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 14 Sep 2018 17:47:08 +0000 (11:47 -0600)
Currently the libxl driver claims support for Xen >= 4.4, but
Xen 4.4 and 4.5 are no longer supported upstream. Let's increase
the minimum supported Xen version to 4.6 and change the defined
LIBXL_API_VERSION to 0x040500, which is the API version defined
when Xen 4.6 was released.

Since Xen 4.6 contains a pkgconfig file, drop the now unused code
that falls back to using LIBVIRT_CHECK_LIB in the absence of
pkgconfig file. In addition, bumping the LIBXL_API_VERSION
required adjusting the calls to libxl_set_vcpuaffinity to account
for the extra parameter in the 0x040500 version of the API.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/drvxen.html.in
m4/virt-driver-libxl.m4
src/libxl/libxl_domain.c
src/libxl/libxl_driver.c

index 2e45e09527585429b37539dde371c2605db9d9de..ff67291ec693e3aa2311140e893e057e11b2645b 100644 (file)
@@ -8,7 +8,7 @@
 
     <p>
       The libvirt libxl driver provides the ability to manage virtual
-      machines on any Xen release from 4.4.0 onwards.
+      machines on any Xen release from 4.6.0 onwards.
     </p>
 
     <h2><a id="project">Project Links</a></h2>
index 90338eb3067f8a68c83517740bd34d93daca7ef0..902da1147268cae285ffdcd07ad53dac29aaa202 100644 (file)
@@ -26,37 +26,14 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [
   LIBXL_CFLAGS=""
   LIBXL_FIRMWARE_DIR=""
   LIBXL_EXECBIN_DIR=""
-  LIBXL_API_VERSION="-DLIBXL_API_VERSION=0x040400"
+  LIBXL_API_VERSION="-DLIBXL_API_VERSION=0x040500"
 
   dnl search for libxl, aka libxenlight
-  dnl Xen > 4.5 introduced a pkgconfig file, check for it first
-  old_with_libxl="$with_libxl"
-  LIBVIRT_CHECK_PKG([LIBXL], [xenlight], [4.4.0], [true])
+  LIBVIRT_CHECK_PKG([LIBXL], [xenlight], [4.6.0])
   if test "x$with_libxl" = "xyes" ; then
     LIBXL_FIRMWARE_DIR=$($PKG_CONFIG --variable xenfirmwaredir xenlight)
     LIBXL_EXECBIN_DIR=$($PKG_CONFIG --variable libexec_bin xenlight)
-  fi
-
-  dnl pkgconfig file not found, fallback to lib probe
-  if test "x$with_libxl" = "xno" ; then
-    with_libxl="$old_with_libxl"
-
-    dnl LIBXL_API_VERSION 4.4.0 introduced a new parameter to
-    dnl libxl_domain_create_restore for specifying restore parameters.
-    dnl The libxl driver will make use of this new parameter for specifying
-    dnl the Xen migration stream version. Specify LIBXL_API_VERSION to trigger
-    dnl an error if there is too old xenlight
-    libxlold_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS $LIBXL_API_VERSION"
-    LIBVIRT_CHECK_LIB([LIBXL], [xenlight], [libxl_ctx_alloc], [libxl.h], [fail="1"])
-    CFLAGS="$libxlold_CFLAGS"
-
-    if test $fail = 1; then
-      AC_MSG_ERROR([You must install the libxl Library from Xen >= 4.4 to compile libxenlight driver with -lxl])
-    fi
-  fi
 
-  if test "$with_libxl" = "yes"; then
     old_LIBS="$LIBS"
     old_CFLAGS="$CFLAGS"
 
index b800bc9f9deee73d1285ceb5787413234a8607ba..0032b9dd11f8ee97e99dc081fddb10ee09a4d2e9 100644 (file)
@@ -886,7 +886,7 @@ libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
         if (virBitmapToData(cpumask, &map.map, (int *)&map.size) < 0)
             goto cleanup;
 
-        if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, i, &map) != 0) {
+        if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, i, &map, NULL) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Failed to pin vcpu '%zu' with libxenlight"), i);
             goto cleanup;
index 539feb9acf733348b3c78576c23d2ec7108f4a00..efd47a39124eb94404dae39924be3b8ee93f8c96 100644 (file)
@@ -2475,7 +2475,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
 
     if (flags & VIR_DOMAIN_AFFECT_LIVE) {
         libxl_bitmap map = { .size = maplen, .map = cpumap };
-        if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, vcpu, &map) != 0) {
+        if (libxl_set_vcpuaffinity(cfg->ctx, vm->def->id, vcpu, &map, NULL) != 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Failed to pin vcpu '%d' with libxenlight"),
                            vcpu);