Re: [PATCH v1] meson: fix xenstore and xentoollog detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/16/21 8:50 AM, Olaf Hering wrote:
Am Mon, 14 Jun 2021 14:38:19 +0100
schrieb Daniel P. Berrangé <berrange@xxxxxxxxxx>:

Based on this policy, it is clear that the Xen minimum should be
4.9 based on version information we can see for the distros.


Just to wrap up here:
The LIBXL_API_VERSION needs to stay at 4.5, because this is the only thing known by Xen 4.9.

It's the only LIBXL_API_VERSION known to Xen 4.5-4.12 :-).

As a result no code can be removed.
There are 4 LIBXL_HAVE_whatever knobs that appeared between Xen 4.6 and 4.9.
As a result only a few lines of #ifdef/#endif could be removed, no actual code.

Sadly, not much can be changed until the minimum supported version can be bumped to 4.13.

So in my opinion it is not worth the effort, the patch for meson.build should be applied as it is.

We are stuck with the 4.5 API through 4.12, but we can still take advantage of other integration-related improvements in Xen such as pkgconfig files. E.g. the attached patch bumps the minimum version to 4.9, which should take care of your issue and makes for one less conditional in meson.build. Opinions?

Regards,
Jim

>From 0e1f8ff035c19848014b236fe3f9420efabb5ed5 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@xxxxxxxx>
Date: Mon, 14 Jun 2021 11:17:54 -0600
Subject: [PATCH] Xen: Bump minimum supported Xen version to 4.9

Platforms supported by libvirt have the following Xen versions

openSUSE Leap 15.2: 4.13
openSUSE Leap 15.3: 4.14
         Fedora 33: 4.14
      Ubuntu 18.04: 4.9
      Ubuntu 20.04: 4.11
     Debian Stable: 4.11

Bumping the minimum version doesn't allow us to drop much code, but it
does provide better alignment with libvirt's platform support statement.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 meson.build | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/meson.build b/meson.build
index eba6d9f765..d489f18ee6 100644
--- a/meson.build
+++ b/meson.build
@@ -1481,7 +1481,7 @@ elif get_option('driver_interface').enabled()
 endif
 
 if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
-  libxl_version = '4.6.0'
+  libxl_version = '4.9.0'
   libxl_dep = dependency('xenlight', version: '>=' + libxl_version, required: get_option('driver_libxl'))
 
   if libxl_dep.found()
@@ -1501,15 +1501,11 @@ if not get_option('driver_libxl').disabled() and conf.has('WITH_LIBVIRTD')
     xl_util_dep = dependency('xlutil')
 
     xen_store_dep = dependency('xenstore')
+    xtl_link_dep = dependency('xentoollog')
 
-    # xtl_* infrastructure is in libxentoollog since Xen 4.7 previously
-    # it was in libxenctrl.
-    if libxl_dep.version().version_compare('>=4.7.0')
-      xtl_link_dep = dependency('xentoollog')
-    else
-      xtl_link_dep = dependency('xenctrl')
-    endif
-
+    # Upstream Xen failed to advertise LIBXL_API_VERSION 0x040700 and
+    # 0x040800 until the Xen 4.13 release. For Xen versions 4.9-4.12
+    # we'll need to stick with the version 0x040500.
     if libxl_dep.version().version_compare('>=4.13.0')
       LIBXL_API_VERSION='0x041300'
     else
-- 
2.31.1


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux