[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] Arm: constrain {,u}int64_aligned_t in public header


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 5 Sep 2023 10:26:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bCjZhitKxoSe0B59YDSAKns2l7OfkDSX/iRNgrXhgrM=; b=PpojojDA3+wYqbRd7DmNXJxM2tbB03H7rmVTTKoOooPEGaCUdpeDpMw8HjRSjHsl+c0ygtykdz4XGERgum5TbPI2BNumnXiSF5dPKMTzEGw/crGUt6vT/92gpa9jN1l17dkVk+IxTmQ8w0aKRcHDnKsFMltGUS5DsHM6TaZY4mA1LPAqAaxCbj580gyIl2zLoGxKfGFKG8FlKwD1IF4xTT1NmMckjRc4hJAORq8Tv/Xm7QARccRxhaheyqzNYhS3LG0sGD2L8GI6vI/JWT8fN29hjZkeWCy8KhzpPFcGhl7nbf+gpjRI5VmUo1CDtlN9M7z4TmtTUSDET1LlnBKOww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kmiK7gcobTEwJ1ZVrnCLcr2AnHc88NVOzsQ2dbZqutZIoOWGHk5Tn9+dA5lzxa8hfJClNDvAj91P+qi/WWC85jjk4vx0ZzgNvSLp3WOJl0QXf7U0evFC7+nauSBnzZ4ecNVEZ/jtHpOUMg40ZHhH4VLjQG/KWxmqvuxqCpNIl1fSQlJKnS4bz2s2miQK7JM/2IDgfwqdxZio3gebpk/qgKiEd246vvXEdFrVzuxbOHs1XfOzagD2o/vdmKY4dVQVZz/m9js/az5ouy+yPxXmvyvIe1c2VWyqsnRaWTAjWHSvbxS0Lr6H4dBFiEiywJW1Eowpon/vxWlNWkkCyBndmA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 05 Sep 2023 08:26:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

For using a GNU extension, it may not be exposed in general, just like
is done on x86 (except that here we need to also work around not all of
the tool stack actually defining __XEN_TOOLS__). External consumers (not
using gcc or a compatible compiler) need to make this type available up
front (just like we expect {,u}int<N>_t to be supplied) - unlike on x86
the type is actually needed outside of tools-only interfaces, because
guest handle definitions use it.

While there also add underscores around "aligned".

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: Also check for __GNUC__.

--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -152,8 +152,10 @@
 
 #define XEN_HYPERCALL_TAG   0XEA1
 
-#define  int64_aligned_t  int64_t __attribute__((aligned(8)))
-#define uint64_aligned_t uint64_t __attribute__((aligned(8)))
+#if defined(__XEN__) || defined(__XEN_TOOLS__) || defined(__GNUC__)
+#define  int64_aligned_t  int64_t __attribute__((__aligned__(8)))
+#define uint64_aligned_t uint64_t __attribute__((__aligned__(8)))
+#endif
 
 #ifndef __ASSEMBLY__
 #define ___DEFINE_XEN_GUEST_HANDLE(name, type)                  \



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.