From nobody Sun Feb 8 17:22:18 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1630940404; cv=none; d=zohomail.com; s=zohoarc; b=AxF5fuZdM5yaFsCUUPgSylqlDzXj57igGxUMH0f1a0tnZClALmPkw+t85egROjq5D8FSo2sXTfVcNVfq735PIoHek2kQns1BE7+nedv1XNS0WkCAdrH1fPbEgIqKXwwwzfN7bP98BCLZ3hEKEI2OMiaHhUQ4FFwC6Mvab4xIs44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630940404; h=Content-Type:Content-Transfer-Encoding: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=C+weTIpjwMZOCXRxgy+EDElNmF1d2fGn9LPfK43QGXk=; b=BH/6upCBPqzBTZB9h7kJ44QOAuF1mM68pNxowEtIxH/YBEz+kq6mtq9G9odfwkWLekZPZPn2J5FGv8ETESEXq08vjN9J4xeXD0+u/aWGUlAS4hzsRZkNRc2tiBCtMlOEkt3pN+SO5Z5YF73zofcab7nPrXtcuM54rYdMhypjF0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) 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 1630940404728826.6061529037339; Mon, 6 Sep 2021 08:00:04 -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-413-HI2fOJNTNK6yBNtVn9QfOA-1; Mon, 06 Sep 2021 10:59:08 -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 C54D2100E40F; Mon, 6 Sep 2021 14:59:02 +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 580AF5D9F4; Mon, 6 Sep 2021 14:59:02 +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 289B744A5F; Mon, 6 Sep 2021 14:59:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 186EwswC004454 for ; Mon, 6 Sep 2021 10:58:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id EFA7577716; Mon, 6 Sep 2021 14:58:54 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AAE56608B for ; Mon, 6 Sep 2021 14:58:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630940403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C+weTIpjwMZOCXRxgy+EDElNmF1d2fGn9LPfK43QGXk=; b=MQL78HZxCyi9oy7ZR7s8mjHBL1KH0SFjNYJ9IM7T0INHKTL15+lWHoBUJUyrUp+84nNuZD v6Cs31L4OnjHQkpwuB9NHtF019jveLOcz1Q3PaKSKHYmHXMm0AOmXbGFZsf59+cgbVMg/A Ou0Q4ntTtu00XELGEa4XwLDRhcUeO9E= X-MC-Unique: HI2fOJNTNK6yBNtVn9QfOA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/6] libxl: remove enum libxlHwcapVersion Date: Mon, 6 Sep 2021 16:58:45 +0200 Message-Id: <315c682779553766c48ded1fe69d648c541543bc.1630939770.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1630940406289100001 As well as the code probing for the version in libxlCapsInitHost. Signed-off-by: J=C3=A1n Tomko --- src/libxl/libxl_capabilities.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index 1953d7a87a..d98109ea86 100644 --- a/src/libxl/libxl_capabilities.c +++ b/src/libxl/libxl_capabilities.c @@ -45,11 +45,6 @@ VIR_LOG_INIT("libxl.libxl_capabilities"); #define LIBXL_X86_FEATURE_PAE_MASK (1 << 6) #define LIBXL_X86_FEATURE_LM_MASK (1 << 29) =20 -enum libxlHwcapVersion { - LIBXL_HWCAP_V0 =3D 0, /* for Xen 4.4 .. 4.6 */ - LIBXL_HWCAP_V1, /* for Xen 4.7 and up */ -}; - struct guest_arch { virArch arch; int hvm; @@ -106,8 +101,7 @@ libxlCapsAddCPUID(virCPUData *data, virCPUx86CPUID *cpu= id, ssize_t ncaps) * */ static virCPUData * -libxlCapsNodeData(virCPUDef *cpu, libxl_hwcap hwcap, - enum libxlHwcapVersion version G_GNUC_UNUSED) +libxlCapsNodeData(virCPUDef *cpu, libxl_hwcap hwcap) { ssize_t ncaps; virCPUData *cpudata =3D NULL; @@ -142,8 +136,7 @@ libxlCapsNodeData(virCPUDef *cpu, libxl_hwcap hwcap, * the X'th 32-bit word of hw_cap. */ static int -libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_info, - enum libxlHwcapVersion version G_GNUC_UNUSED) +libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_info) { virCPUData *data =3D NULL; virCPUDef *cpu =3D NULL; @@ -177,7 +170,7 @@ libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_inf= o, =20 ret =3D 0; =20 - if (!(data =3D libxlCapsNodeData(cpu, phy_info->hw_cap, version)) || + if (!(data =3D libxlCapsNodeData(cpu, phy_info->hw_cap)) || cpuDecode(cpu, data, NULL) < 0) { VIR_WARN("Failed to initialize host cpu features"); goto error; @@ -196,8 +189,6 @@ libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_inf= o, static int libxlCapsInitHost(libxl_ctx *ctx, virCaps *caps) { - const libxl_version_info *ver_info; - enum libxlHwcapVersion version; libxl_physinfo phy_info; int ret =3D -1; =20 @@ -208,14 +199,7 @@ libxlCapsInitHost(libxl_ctx *ctx, virCaps *caps) goto cleanup; } =20 - if ((ver_info =3D libxl_get_version_info(ctx)) =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Failed to get version info from libxenlight")); - goto cleanup; - } - - version =3D (ver_info->xen_version_minor >=3D 7); - if (libxlCapsInitCPU(caps, &phy_info, version) < 0) + if (libxlCapsInitCPU(caps, &phy_info) < 0) goto cleanup; =20 if (virCapabilitiesSetNetPrefix(caps, LIBXL_GENERATED_PREFIX_XEN) < 0) --=20 2.31.1