[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Arm: constrain {,u}int64_aligned_t in public header
- To: Henry Wang <Henry.Wang@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 5 Sep 2023 10:23:04 +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=fizhdZTeaN1ZrOIRkRNtGAYrbL2Kl430AMz7kkJjzXE=; b=KsKNIrR2Mo+7q630/A+SwpFgxqOzruP1wKzcS6m5ttmlOx8J++/tWCryKqmp+8Lsay65+Hwnw47ju02CxUnA+944oio24E2thG0UMLjl94e6HOSyRoLJfXdxlpxxchmW8jaWGsJvJKLW9oajDf7z1fKawq3If540As8CCur3mskWJEu++O9CU03Uk99M2COV8/qCjCHGxfPo5pOWQ5+aby1HXlb1weI287JrOBxc3OIz/JArDuNCFjGldP19ScBRqx9M7EsHLOIJ8OS6Kz926I5EW1R67Oe+zxfNH4Gs/dAjf/jCEQwFMBRX2o42qyRbv9lMluLQJTPPjX7ISFazQQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MTqY5TrPxWtDBQPYcbNcyHx6EViiuPprJmqAqoo9lvNvZ45lwbkMHIdcQO5a0zJb2hz0tQbSrdRyvOsJPvbmnw1qz1wBx8qHx+cJWVtzJ9HAKpsnRt8btC75iLuIkYJ1pwe1QHKRLhz6ZcdkE4+gtUTvsnj4Cc4gpG6u+T+xyEFT5L0QahDu5zOunv/0daDi+E/4pxYx4XQqJlUUxbs/6ZF8XzvrV5f+4MVuGn4q+0AqLgNz8SUqqDklHj1IaXvvKlutRRhskgwhXvOmNzAduiWrJxuE8NFAwkyfqkTxJjfd6YXrX6Ck0OCI2bJn4D3+dXrBxndSsAFn2Bey/BrrEg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Delivery-date: Tue, 05 Sep 2023 08:23:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 05.09.2023 04:08, Henry Wang wrote:
>> On Sep 1, 2023, at 15:26, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> --- 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__)
>> +#define int64_aligned_t int64_t __attribute__((__aligned__(8)))
>> +#define uint64_aligned_t uint64_t __attribute__((__aligned__(8)))
>> +#endif
>
> Today I tested this patch by our CI (on top of today’s staging), and it looks
> like below error will happen for both arm32 and arm64 Yocto build:
>
> The arm32 failure:
> https://pastebin.com/raw/S7ZqmG6z
>
> The arm64 failure:
> https://pastebin.com/raw/HMFh5tuS
Thanks for pointing this out. Turns out that not even all libraries
get __XEN_TOOLS__ defined (see tools/Rules.mk). In the case of
toolcore, the public xen.h is included solely to get a definition
of domid_t. None of the handles are actually needed. I wonder if such
a dependency couldn't be avoided. Yet doing so would help only a little:
Other libraries (evtchn or gnttab for example) likely need more, yet
don't depend on libxc either.
For the time being I'll extend the #if to also check for __GNUC__, but
I'm not convinced this is a good way of dealing with the issue.
Jan
|