From nobody Mon Feb 9 11:28:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1670510191; cv=none; d=zohomail.com; s=zohoarc; b=OkUGpmwEFRfAmViNw+evN4s9Xnj0OqMkKl6CAJvtBBF2P0yYOUHaib3mGDCiUZw0Z7Lg4Jy9zK44xztmhgn8qT3FX+H54l1fhTg1XZ8xBkofNoPGkBX7Mu+UjIJfPxKPxYo/VgvgvXzkYim+jYq7wJ0cjw9y/yNkBCW4OiiN4/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670510191; 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=RmwqIgUmAFq0/WCcwip3ElsL0A8B0HDBaYhnXHUHEBo=; b=mrilbqRBkZBQa4yIyUMlrygVH5GyUyuwk1FuVMIEomniPFirpiEYPhV0NMWM5H+WmzJ8Wafck59FL+LpiFufQHNQp7Ad63QVUloUFLEOQrS98lwrW1rKZt72573cdpu1CbsHOc0UaB/IQbZxD1aBQvlpr7p1xKNBqOQNUv4u688= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1670510191662620.5871669606462; Thu, 8 Dec 2022 06:36:31 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-9S1HCKPEOoa1hJQpxsbWBg-1; Thu, 08 Dec 2022 09:36:21 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19AB680252D; Thu, 8 Dec 2022 14:35:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03B0E1121331; Thu, 8 Dec 2022 14:35:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CC1B0194704E; Thu, 8 Dec 2022 14:35:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 33C5D1947B89 for ; Thu, 8 Dec 2022 14:35:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 67C852028E94; Thu, 8 Dec 2022 14:35:49 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.33.36.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id D71552023A1D; Thu, 8 Dec 2022 14:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670510190; 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=RmwqIgUmAFq0/WCcwip3ElsL0A8B0HDBaYhnXHUHEBo=; b=d/FSxzV4QDsiKTr76gI4b0oskwb/M7YzmVgQQuGuYS+9I8eYniguwfyJTQHdZY3daJqqGP SSqGsHFp2Z3lDfMGuH0pqxqrcUAEnT9jGx+/EiiR8SuoROVOvwCJfVTzMhE5uiIFH03aDf hCHaqCIZQYjxGHh64aqudWgkyB4mhmM= X-MC-Unique: 9S1HCKPEOoa1hJQpxsbWBg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 21/21] meson: remove obsolete check for BPF_CGROUP_DEVICE Date: Thu, 8 Dec 2022 14:35:25 +0000 Message-Id: <20221208143525.1731853-22-berrange@redhat.com> In-Reply-To: <20221208143525.1731853-1-berrange@redhat.com> References: <20221208143525.1731853-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1670510201025100001 The BPF_CGROUP_DEVICE constant was introduced to Linux in commit ebc614f687369f9df99828572b1d85a7c2de3d92 Author: Roman Gushchin Date: Sun Nov 5 08:15:32 2017 -0500 bpf, cgroup: implement eBPF-based device controller for cgroup v2 This is old enough that all our supported platforms can be assumed to have this feature. Signed-off-by: Daniel P. Berrang=C3=A9 --- meson.build | 7 ------- src/util/vircgroupv2devices.c | 10 +++++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 790d52ec8d..e48e63ef01 100644 --- a/meson.build +++ b/meson.build @@ -644,13 +644,6 @@ symbols =3D [ [ 'sched.h', 'cpu_set_t' ], ] =20 -if host_machine.system() =3D=3D 'linux' - symbols +=3D [ - # Check if we have new enough kernel to support BPF devices for cgroup= s v2 - [ 'linux/bpf.h', 'BPF_CGROUP_DEVICE' ], - ] -endif - foreach symbol : symbols if cc.has_header_symbol(symbol[0], symbol[1], args: '-D_GNU_SOURCE', pre= fix: symbol.get(2, '')) conf.set('WITH_DECL_@0@'.format(symbol[1].to_upper()), 1) diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c index 1769c499c8..05818c4130 100644 --- a/src/util/vircgroupv2devices.c +++ b/src/util/vircgroupv2devices.c @@ -17,13 +17,13 @@ */ #include =20 -#if WITH_DECL_BPF_CGROUP_DEVICE +#if __linux__ # include # include # include # include # include -#endif /* !WITH_DECL_BPF_CGROUP_DEVICE */ +#endif /* __linux__ */ =20 #include "internal.h" =20 @@ -41,7 +41,7 @@ VIR_LOG_INIT("util.cgroup"); =20 #define VIR_FROM_THIS VIR_FROM_CGROUP =20 -#if WITH_DECL_BPF_CGROUP_DEVICE +#ifdef __linux__ bool virCgroupV2DevicesAvailable(virCgroup *group) { @@ -583,7 +583,7 @@ virCgroupV2DevicesGetPerms(int perms, =20 return ret; } -#else /* !WITH_DECL_BPF_CGROUP_DEVICE */ +#else /* !__linux__ */ bool virCgroupV2DevicesAvailable(virCgroup *group G_GNUC_UNUSED) { @@ -634,7 +634,7 @@ virCgroupV2DevicesGetPerms(int perms G_GNUC_UNUSED, { return 0; } -#endif /* !WITH_DECL_BPF_CGROUP_DEVICE */ +#endif /* !__linux__ */ =20 =20 uint64_t --=20 2.38.1