From nobody Mon Feb 9 02:13:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1616689631; cv=none; d=zohomail.com; s=zohoarc; b=JCZSUSRR4zQt/Dx4eKG137RBH2DXqtfeko3fyA14p2fqZEDDPPEYC+60teF1pcc+3ZC3BI6E31+fP16dmxmsHOy/Q6gU1m/SWZQMsBYEl7XQRPVp/nKOTUKikeVu3ZRj+9OTCI/9k5djFnAwGAxkky1TaxMbBJC+vICCDGdNlBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616689631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZMW3jRLgllK+PEpSeVQDb/QWdG/tjbn5ybCw9j2go6g=; b=V0IPwR7jxoC6ADb9qPXZsN0imKAsCJgpWHFmqwBvJnguMXNg8Kdjvhd+j9PgTNnIdOxaXQp2hrdQ14S6OAAbf0axF7wynqpLJKFN40MBWiJLfC3VoAAIzIkzRTJ2eZjMWuSrQNxeQoeYPSgD2jSsH66Hv/U5rF4IGoidM+m4Uew= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1616689631930622.1016688464192; Thu, 25 Mar 2021 09:27:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-zrAHAAmtMW6b_1_GST30Pg-1; Thu, 25 Mar 2021 12:27:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F8471018F74; Thu, 25 Mar 2021 16:27:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51FB917258; Thu, 25 Mar 2021 16:27:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0B5EB4BB7C; Thu, 25 Mar 2021 16:27:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12PGQReW032183 for ; Thu, 25 Mar 2021 12:26:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id D26B820E1D81; Thu, 25 Mar 2021 16:26:27 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD09820E1D80 for ; Thu, 25 Mar 2021 16:26:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B4A27100DE7F for ; Thu, 25 Mar 2021 16:26:27 +0000 (UTC) Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-CatcE7ozM9uI2bZmTRlCXg-1; Thu, 25 Mar 2021 12:26:25 -0400 Received: from sender by smtp.strato.de (RZmta 47.22.0 SBL|AUTH) with ESMTPSA id 204541x2PGQL6TW (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Thu, 25 Mar 2021 17:26:21 +0100 (CET) X-MC-Unique: zrAHAAmtMW6b_1_GST30Pg-1 X-MC-Unique: CatcE7ozM9uI2bZmTRlCXg-1 X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS32Qg" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: libvir-list@redhat.com Subject: [PATCH v2 12/12] libxl: use API 4.13 to support domUs with more than 4TB Date: Thu, 25 Mar 2021 17:26:12 +0100 Message-Id: <20210325162612.8355-13-olaf@aepfle.de> In-Reply-To: <20210325162612.8355-1-olaf@aepfle.de> References: <20210325162612.8355-1-olaf@aepfle.de> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Olaf Hering X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To support domUs with more than 4TB memory it is required to use LIBXL_API_VERSION >=3D 0x040800, which uses uint64_t for certained guest memory related quantities. Unfortunately this change is not straight forward. While most of the code in libxl.h handles the various LIBXL_API_VERSION variants correctly, the check for valid a LIBXL_API_VERSION at the beginning of the file was broken between Xen 4.7 and 4.13 - it did not cover for API changes introduced in Xen 4.7 and 4.8. This was fixed with xen-project/xen@c3999835df, which for libvirt means in practice either the libxl API from Xen 4.5 or 4.13+ can be used. This change uses pkgconfig to decide which API can be safely selected. Xen provides a pkgconfig file since Xen 4.6, which is also the lowest version expected by libvirt. Signed-off-by: Olaf Hering --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ea93a2a8ec..d246886cbf 100644 --- a/meson.build +++ b/meson.build @@ -1592,8 +1592,13 @@ if not get_option('driver_libxl').disabled() and con= f.has('WITH_LIBVIRTD') xtl_link_dep =3D cc.find_library('xenctrl') endif =20 + if libxl_dep.version().version_compare('>=3D4.13.0') + LIBXL_API_VERSION=3D'0x041300' + else + LIBXL_API_VERSION=3D'0x040500' + endif libxl_dep =3D declare_dependency( - compile_args: '-DLIBXL_API_VERSION=3D0x040500', + compile_args: '-DLIBXL_API_VERSION=3D' + LIBXL_API_VERSION, dependencies: [ libxl_dep, xtl_link_dep,