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

Re: Xen reliance on non-standard GCC features


  • To: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Jun 2023 08:37: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=kIvmbZ8QvtyV75kzqiZdh3kZ1MQSdNcSZP1FKdpQBnA=; b=GrhsQuHSzI6VdF1ecB4UyVcfUcCI0zTO8ZNO2WEYhXv3ZyFiEkafNa+/HoRrY1A3+VuSWvjjncq3o5qH7yJlbkQJjqRMPnMR9fclll3FDEL5UwSsCVub6U7xt39olcr220FRWZJd+4Ugb1vW5lsntF77964QNJ2WXymgm1Qs4x6Kq7hkylN3wbOXlfeL+8NFN+ojlAPFfiDxxoLqL2SX6Rzgx7toORg+M8DN7OF28RHRj3ENDzg0ys4EnHTkELVW569fCxtOnPWzwoUHb5kQtOh+spFH9PRjoJeOP/f4m8gKuMaGeRYUdbe56WC9LUKpNjKez22KkResKFt7te0chg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGTKGULwAfkjdwLlSb3x20oOim0c5zelQ/GVMw/WAbB8IvhZeA1AN5D6AIULe8bd8+Z2VhsmoH9SEIY9GW0QfM7EV+5OMgYrksfL7AXLKPTdZVRV09gHlUO05h58UeO++QDXJuu7aFlsxNwsJot+qM6tBY1ozhXiVWaYMgeKtwvti9d8/lLOrzFF0WnO4esW1LizPAfxHF8t1NB88JpQQIDXr/er2whf7eEPOiifkknqkTf27NJSqs0fLpuuSp23jaP35x/O3GWU9ESVdZWUnOAq6B/f/ELwLuyAJ0AQOFJYg3D88Sbr6pH8IFJY56VH0ydQoSTPMgyb5ucq40/a+A==
  • 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>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
  • Delivery-date: Wed, 07 Jun 2023 06:37:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.06.2023 23:39, Stefano Stabellini wrote:
> On Mon, 5 Jun 2023, Roberto Bagnara wrote:
>>>> Here is a list of extensions that are documented in the GCC manual:
>>>
>>> I suppose that this list wasn't meant to be complete? The most
>>> prominent example is probably asm().
>>
>> As far as I can tell the list was almost complete (I realize now
>> that the use of the keyword __signed__ was omitted because
>> investigation was not completed).  But I am probably misunderstanding
>> you.
> 
> We also make use of the following extensions (please correct me if I am
> wrong and these are not extensions):
> 
> xen/include/xen/compiler.h:#define always_inline __inline__ __attribute__ 
> ((__always_inline__))
> xen/include/xen/compiler.h:#define gnu_inline    __inline__ __attribute__ 
> ((__gnu_inline__))
> xen/include/xen/compiler.h:#define noinline      __attribute__((__noinline__))
> xen/include/xen/compiler.h:#define noreturn      __attribute__((__noreturn__))
> xen/include/xen/compiler.h:#define __packed      __attribute__((__packed__))
> xen/include/xen/compiler.h:#define __weak        __attribute__((__weak__))
> xen/include/xen/compiler.h:# define nocall       
> __attribute__((__error__("Nonstandard ABI")))
> xen/include/xen/compiler.h:# define cf_check     __attribute__((__cf_check__))
> xen/include/xen/compiler.h:# define fallthrough        
> __attribute__((__fallthrough__))
> xen/include/xen/compiler.h:#define __aligned(a) 
> __attribute__((__aligned__(a)))
> xen/include/xen/compiler.h:#define __attribute_pure__  
> __attribute__((__pure__))
> xen/include/xen/compiler.h:#define __attribute_const__ 
> __attribute__((__const__))
> xen/include/xen/compiler.h:#define __transparent__     
> __attribute__((__transparent_union__))
> xen/include/xen/compiler.h:#define __used         __attribute__((__used__))
> xen/include/xen/compiler.h:#define __maybe_unused __attribute__((__unused__))
> xen/include/xen/compiler.h:#define __must_check 
> __attribute__((__warn_unused_result__))
> xen/include/xen/compiler.h:#define __nonnull(...) 
> __attribute__((__nonnull__(__VA_ARGS__)))
> 
> It is possible that some of these don't show up in any of the relevant
> code build as part of the minimal configuration for safety so you won't
> see any errors/warnings in Eclair.
> 
> Also, some of these extensions are probably no longer necessary, such as
> __gnu_inline__.

gnu_inline was already noticed as in use - see bsearch() and sort(). Iirc
Andrew in particular wants it used in further places.

Jan



 


Rackspace

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