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

Re: Xen reliance on non-standard GCC features


  • To: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Date: Mon, 5 Jun 2023 14:39:28 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=bugseng.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=3sUczbDXjmMZe7GlucbeQzB1gtOCgQO7kTKUdod/ILE=; b=AaGhveYrMlbfnTkpsJ33L9hn9QDAug8a9O01IFN0S0Y2+GY071ZVzFvHcOiP8UBD9x1HU9gj/hb4T39iUrxdv7LGsXeZA87rG37eEV1ye5pjHvDYhZa8BzKJXUtW8AFRtWFR8WdNV/diSc/cJUqKu5XBXdcN46vExJl9thgenBbLxaws2X3cXfAoqszJ+fvZQx+lr+qYMYxi/yDv3dVO4mwABDsYJpNXDBePSmJK+jCA4zDZgjASYUwlrkk4DLQ2KlVNfpWYpZgEr4E9Gxpiezt+PMttkUCWyCzBrdBPdo5naMpou3ixne3shkOeKhVixGkNStRWHONq3LSq5WwSPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=elmlYW6sItkgQ1L2rWanQbiDnt9qz4fqVSDO5GFqB06tHQxU/oFCzEmcsydWPAagCrWWVg0djo385eoFyG88YQXvhkshtr1wYszUtndljuab3USqD1C9HEvxBCMVnNdg4HtJ/Kc2drRX+6+zATsEUo0Ycs4aS0tH6CFHdW7aIQxKEQpdl+EmMbNKXKVrlug906ZBn3R7AulOMHiZ2OgCyMkzuNUhu1cyexh1JyFkbwB1SDLcBXucCH9Q83i4yedsjfZNyBJR8PyS+UDqieV9maaaqNqZRBbRo3xL1iGolmkT8KZt6skBQb4AAGkmi2dyPJvy/ESbrkfwMnDY15Xvhg==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 05 Jun 2023 21:39:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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__.



 


Rackspace

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