[PATCH v1] meson: fix xenstore and xentoollog detection

Daniel P. Berrangé berrange at redhat.com
Thu Jun 17 08:49:07 UTC 2021


On Wed, Jun 16, 2021 at 02:30:45PM -0600, Jim Fehlig wrote:
> On 6/16/21 8:50 AM, Olaf Hering wrote:
> > Am Mon, 14 Jun 2021 14:38:19 +0100
> > schrieb Daniel P. Berrangé <berrange at redhat.com>:
> > 
> > > 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.

If i look at current libvirt git I see ifdefs for

$ git grep ifdef src/libxl/ | awk '{print $2}' | grep HAVE | sort | uniq > ~/defs
LIBXL_HAVE_BUILDINFO_APIC
LIBXL_HAVE_BUILDINFO_BOOTLOADER
LIBXL_HAVE_BUILDINFO_GRANT_LIMITS
LIBXL_HAVE_BUILDINFO_KERNEL
LIBXL_HAVE_BUILDINFO_NESTED_HVM
LIBXL_HAVE_BUILDINFO_SERIAL_LIST
LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST
LIBXL_HAVE_CREATEINFO_PASSTHROUGH
LIBXL_HAVE_DEVICE_BACKEND_DOMNAME
LIBXL_HAVE_DEVICE_CHANNEL
LIBXL_HAVE_DOMAIN_NODEAFFINITY
LIBXL_HAVE_DOMAIN_SUSPEND_ONLY
LIBXL_HAVE_NO_SUSPEND_RESUME
LIBXL_HAVE_PVUSB
LIBXL_HAVE_QED
LIBXL_HAVE_QXL
LIBXL_HAVE_SIGCHLD_OWNER_SELECTIVE_REAP
LIBXL_HAVE_SOFT_RESET
LIBXL_HAVE_SPICE_VDAGENT
LIBXL_HAVE_SRM_V2
LIBXL_HAVE_VNUMA

Out of those, if I grab the Xen 4.9.3 source code I see #defines
for

$ for i in `cat ~/defs` ; do grep $i *.h ; done | grep define | awk '{print $2}'
LIBXL_HAVE_BUILDINFO_KERNEL
LIBXL_HAVE_BUILDINFO_SERIAL_LIST
LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST
LIBXL_HAVE_DEVICE_BACKEND_DOMNAME
LIBXL_HAVE_DEVICE_CHANNEL
LIBXL_HAVE_DOMAIN_NODEAFFINITY
LIBXL_HAVE_NO_SUSPEND_RESUME
LIBXL_HAVE_PVUSB
LIBXL_HAVE_QED
LIBXL_HAVE_QXL
LIBXL_HAVE_SIGCHLD_OWNER_SELECTIVE_REAP
LIBXL_HAVE_SOFT_RESET
LIBXL_HAVE_SPICE_VDAGENT
LIBXL_HAVE_SRM_V2
LIBXL_HAVE_VNUMA


That looks like quite a few ifdefs that can be removed ?

> > 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 at suse.com>
> 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 at suse.com>
> ---
>  meson.build | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list