From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Subject: [PATCH v3 1/3] tools: Add __AC() macro to common-macros.h
Date: Thu, 29 Jun 2023 13:17:11 +0100 [thread overview]
Message-ID: <20230629121713.1211-2-alejandro.vallejo@cloud.com> (raw)
In-Reply-To: <20230629121713.1211-1-alejandro.vallejo@cloud.com>
Currently libxl and the x86-emulator tests carry their own versions. Factor
those out into the common macros header so every library can make use of
it. This is required so the following patch can add this macro to a header
used both in Xen and tools/libs.
No functional change.
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
---
tools/include/xen-tools/common-macros.h | 3 +++
tools/libs/light/libxl_internal.h | 2 --
tools/tests/x86_emulator/x86-emulate.h | 3 ---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 168691be0e..6d7de1bc0a 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -84,4 +84,7 @@
(type *)((char *)mptr__ - offsetof(type, member)); \
})
+#define __AC(X,Y) (X##Y)
+#define _AC(X,Y) __AC(X,Y)
+
#endif /* __XEN_TOOLS_COMMON_MACROS__ */
diff --git a/tools/libs/light/libxl_internal.h b/tools/libs/light/libxl_internal.h
index 61f4fe1dec..1cf3d400bf 100644
--- a/tools/libs/light/libxl_internal.h
+++ b/tools/libs/light/libxl_internal.h
@@ -125,8 +125,6 @@
#define PVSHIM_CMDLINE "pv-shim console=xen,pv"
/* Size macros. */
-#define __AC(X,Y) (X##Y)
-#define _AC(X,Y) __AC(X,Y)
#define MB(_mb) (_AC(_mb, ULL) << 20)
#define GB(_gb) (_AC(_gb, ULL) << 30)
diff --git a/tools/tests/x86_emulator/x86-emulate.h b/tools/tests/x86_emulator/x86-emulate.h
index aa1ed75ec8..350d1a0abf 100644
--- a/tools/tests/x86_emulator/x86-emulate.h
+++ b/tools/tests/x86_emulator/x86-emulate.h
@@ -59,9 +59,6 @@
#define cf_check /* No Control Flow Integriy checking */
-#define AC_(n,t) (n##t)
-#define _AC(n,t) AC_(n,t)
-
#ifdef __GCC_ASM_FLAG_OUTPUTS__
# define ASM_FLAG_OUT(yes, no) yes
#else
--
2.34.1
next prev parent reply other threads:[~2023-06-29 12:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 12:17 [PATCH v3 0/3] Introduce a REQUIRE_NX Kconfig option Alejandro Vallejo
2023-06-29 12:17 ` Alejandro Vallejo [this message]
2023-06-29 15:46 ` [PATCH v3 1/3] tools: Add __AC() macro to common-macros.h Alejandro Vallejo
2023-06-30 11:16 ` Andrew Cooper
2023-06-29 12:17 ` [PATCH v3 2/3] x86/boot: Clear XD_DISABLE from the early boot path Alejandro Vallejo
2023-06-29 15:46 ` Alejandro Vallejo
2023-06-30 11:19 ` Andrew Cooper
2023-06-30 12:28 ` Andrew Cooper
2023-06-29 12:17 ` [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support Alejandro Vallejo
2023-06-29 15:48 ` Alejandro Vallejo
2023-07-18 13:19 ` Jan Beulich
2023-07-19 6:13 ` Jan Beulich
2023-07-19 11:11 ` Alejandro Vallejo
2023-06-29 15:36 ` [PATCH v3 0/3] Introduce a REQUIRE_NX Kconfig option Alejandro Vallejo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230629121713.1211-2-alejandro.vallejo@cloud.com \
--to=alejandro.vallejo@cloud.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.