From nobody Mon Feb 9 02:51:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615978674; cv=none; d=zohomail.com; s=zohoarc; b=ljQUOU7+o70lZifvT1JLMgAdQ8ZQYG8l9C7I9idLKE2xKomdEQMltQ69QYiUZD9LvhEZ+qgpTgFIkVzOS6GcSagduoJU+Q5FapUcOEwiUb7fWKy5xui9n9ngg/AXXYvvW1m6vr07a+GXs8BMcdVbERpIXpLCR4tltdK5f/FtCNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615978674; 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=Jtcu2j5hE+nAvyRue4dAxIELFCpvl04rv96pf0dA4/LaD3LwWtj77Hl4nhdvGMM5kABxpw5onPt0hv7qaB8zg/nq5GfOWGgmuPiqkczVdZKUqsb9WnNUA3vOaVFweIETPHjD35cQaLd1QC++9K27JXGbzwSWnGogFT8jEeXFwTk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1615978674536357.0480492818705; Wed, 17 Mar 2021 03:57:54 -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-588-4pNXAbHOPqKVoDzDXur_MQ-1; Wed, 17 Mar 2021 06:57:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DEFAF107ACCA; Wed, 17 Mar 2021 10:57:46 +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 B90895D9D3; Wed, 17 Mar 2021 10:57:46 +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 6D86F4BB7C; Wed, 17 Mar 2021 10:57:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12HAvim3021639 for ; Wed, 17 Mar 2021 06:57:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 71B09E2030; Wed, 17 Mar 2021 10:57:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C835E56AA for ; Wed, 17 Mar 2021 10:57:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 54DAC800140 for ; Wed, 17 Mar 2021 10:57:44 +0000 (UTC) Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-IEuH8KzJO9WxRMb1OqEekQ-1; Wed, 17 Mar 2021 06:57:42 -0400 Received: from sender by smtp.strato.de (RZmta 47.21.0 SBL|AUTH) with ESMTPSA id k0a44fx2HAvd10U (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 Mar 2021 11:57:39 +0100 (CET) X-MC-Unique: 4pNXAbHOPqKVoDzDXur_MQ-1 X-MC-Unique: IEuH8KzJO9WxRMb1OqEekQ-1 X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QXkBR9MXjAuzBW/OdlBZQ4AHSS325Pjw==" X-RZG-CLASS-ID: mo00 From: Olaf Hering To: libvir-list@redhat.com Subject: [PATCH v1 12/12] libxl: use API 4.13 to support domUs with more than 4TB Date: Wed, 17 Mar 2021 11:57:28 +0100 Message-Id: <20210317105728.3745-13-olaf@aepfle.de> In-Reply-To: <20210317105728.3745-1-olaf@aepfle.de> References: <20210317105728.3745-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.79 on 10.11.54.5 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.14 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,