From nobody Thu Oct 30 22:56:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1756509724; cv=none; d=zohomail.com; s=zohoarc; b=NjjuoV7xc744Bmluet8SeZK4PD3SikVylvVryzhHAL/rEy3suaxNe2AIF6tW8I41t19qjbXKcELRaJGii9e+NpR1x6kfG/QXb2zu1kNVyqZO9UZuqRsnMRQhdVEYrM+En8V1Mo2b8ewfyCawakHckuE9Bnxs1duwSmj9sGIwmTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756509724; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SmK1a8qSk8xhhylhd/KkmU691XlhHEf3wjfBWdZ2Vac=; b=KV78cDRCD1uNG3hyS+sMrQl62BdwIEwoTYSWux27nhExhMpLfLzu2dEp+tkSzeky5jKRfBUaGM2Hhuor0xhWWhk5Gx7OfOlFuYbs3JIkmsLkU2sUc2z7Y70HDIst4Jnp+jFyMpPISLEXTahylnLcVAQzEaV7NYlEL2/BDyRkrSI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1756509724472134.84013151554404; Fri, 29 Aug 2025 16:22:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1102358.1454993 (Exim 4.92) (envelope-from ) id 1us8Pd-00085Y-Dy; Fri, 29 Aug 2025 23:21:41 +0000 Received: by outflank-mailman (output) from mailman id 1102358.1454993; Fri, 29 Aug 2025 23:21:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1us8Pd-00085R-Au; Fri, 29 Aug 2025 23:21:41 +0000 Received: by outflank-mailman (input) for mailman id 1102358; Fri, 29 Aug 2025 23:21:40 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1us8Pc-0007yd-F7 for xen-devel@lists.xenproject.org; Fri, 29 Aug 2025 23:21:40 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1us8Pb-00CpQV-09; Fri, 29 Aug 2025 23:21:39 +0000 Received: from [19.12.91.86] (helo=localhost) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1us8Pb-008JlN-03; Fri, 29 Aug 2025 23:21:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From; bh=SmK1a8qSk8xhhylhd/KkmU691XlhHEf3wjfBWdZ2Vac=; b=VORaCYDDKEOr8aqvkbCaL8DI9V 3CSxIxWlVdTTHzO+94B5CoKAbhVOSKhWxtj/TE5T59TnlwDQHnKBw+oM6LGT4Px3bY97Awufgu0ig P4IeAoWrK1NruQJisYebUVAUWHsa8v0bYSDPH0RYAneOlyqkD3XOTu/a9ppX4+GyX0UQ=; From: dmukhin@xen.org To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com, sstabellini@kernel.org, dmukhin@ford.com Subject: [PATCH v17 2/4] tools/include: move xc_bitops.h to xen-tools/bitops.h Date: Fri, 29 Aug 2025 16:21:30 -0700 Message-ID: <20250829232132.3460081-3-dmukhin@ford.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250829232132.3460081-1-dmukhin@ford.com> References: <20250829232132.3460081-1-dmukhin@ford.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xen.org) X-ZM-MESSAGEID: 1756509726048124100 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin =20 Move xc_bitops.h to common tools location to be shared between the toolstack and unit test code. Adjust the guard in xen-tools/bitops.h Correct the #include directives and comments referring to the old xc_bitops.h in the toolstack code. Signed-off-by: Denis Mukhin Acked-by: Anthony PERARD --- Changes since v16: - dropped unneeded includes - added Anthony's A-b --- .../ctrl/xc_bitops.h =3D> include/xen-tools/bitops.h} | 6 +++--- tools/libs/ctrl/xc_misc.c | 13 +++++++------ tools/libs/guest/xg_dom_elfloader.c | 1 - tools/libs/guest/xg_dom_hvmloader.c | 1 - tools/libs/guest/xg_private.h | 2 +- tools/libs/guest/xg_sr_common.h | 2 -- 6 files changed, 11 insertions(+), 14 deletions(-) rename tools/{libs/ctrl/xc_bitops.h =3D> include/xen-tools/bitops.h} (95%) diff --git a/tools/libs/ctrl/xc_bitops.h b/tools/include/xen-tools/bitops.h similarity index 95% rename from tools/libs/ctrl/xc_bitops.h rename to tools/include/xen-tools/bitops.h index 4a776dc3a57f..681482f6759f 100644 --- a/tools/libs/ctrl/xc_bitops.h +++ b/tools/include/xen-tools/bitops.h @@ -1,5 +1,5 @@ -#ifndef XC_BITOPS_H -#define XC_BITOPS_H 1 +#ifndef __XEN_TOOLS_BITOPS_H__ +#define __XEN_TOOLS_BITOPS_H__ =20 /* bitmap operations for single threaded access */ =20 @@ -81,4 +81,4 @@ static inline void bitmap_or(void *_dst, const void *_oth= er, dst[i] |=3D other[i]; } =20 -#endif /* XC_BITOPS_H */ +#endif /* __XEN_TOOLS_BITOPS_H__ */ diff --git a/tools/libs/ctrl/xc_misc.c b/tools/libs/ctrl/xc_misc.c index 33e87bac2868..10ddf85667a9 100644 --- a/tools/libs/ctrl/xc_misc.c +++ b/tools/libs/ctrl/xc_misc.c @@ -17,8 +17,8 @@ * License along with this library; If not, see . */ =20 -#include "xc_bitops.h" #include "xc_private.h" +#include #include =20 int xc_get_max_cpus(xc_interface *xch) @@ -94,11 +94,12 @@ xc_cpumap_t xc_cpumap_alloc(xc_interface *xch) } =20 /* - * xc_bitops.h has macros that do this as well - however they assume that - * the bitmask is word aligned but xc_cpumap_t is only guaranteed to be - * byte aligned and so we need byte versions for architectures which do - * not support misaligned accesses (which is basically everyone - * but x86, although even on x86 it can be inefficient). + * has macros that do this as well - however they + * assume that the bitmask is word aligned but xc_cpumap_t is only + * guaranteed to be byte aligned and so we need byte versions for + * architectures which do not support misaligned accesses (which is + * basically everyone but x86, although even on x86 it can be + * inefficient). * * NOTE: The xc_bitops macros now use byte alignment. * TODO: Clean up the users of this interface. diff --git a/tools/libs/guest/xg_dom_elfloader.c b/tools/libs/guest/xg_dom_= elfloader.c index f17930d98bf7..a55b5e8c3caf 100644 --- a/tools/libs/guest/xg_dom_elfloader.c +++ b/tools/libs/guest/xg_dom_elfloader.c @@ -26,7 +26,6 @@ #include =20 #include "xg_private.h" -#include "xc_bitops.h" =20 #define XEN_VER "xen-3.0" =20 diff --git a/tools/libs/guest/xg_dom_hvmloader.c b/tools/libs/guest/xg_dom_= hvmloader.c index 39e1e5f579a7..a98c7fe5d877 100644 --- a/tools/libs/guest/xg_dom_hvmloader.c +++ b/tools/libs/guest/xg_dom_hvmloader.c @@ -25,7 +25,6 @@ #include =20 #include "xg_private.h" -#include "xc_bitops.h" =20 /* -----------------------------------------------------------------------= - */ /* parse elf binary = */ diff --git a/tools/libs/guest/xg_private.h b/tools/libs/guest/xg_private.h index d73947094f2e..285229cf82a3 100644 --- a/tools/libs/guest/xg_private.h +++ b/tools/libs/guest/xg_private.h @@ -28,9 +28,9 @@ #include =20 #include "xc_private.h" -#include "xc_bitops.h" #include "xenguest.h" =20 +#include #include #include #include diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs/guest/xg_sr_commo= n.h index 2f058ee3a6ff..0e419c3a96a0 100644 --- a/tools/libs/guest/xg_sr_common.h +++ b/tools/libs/guest/xg_sr_common.h @@ -5,8 +5,6 @@ =20 #include "xg_private.h" #include "xg_save_restore.h" -#include "xc_bitops.h" - #include "xg_sr_stream_format.h" =20 /* String representation of Domain Header types. */ --=20 2.51.0