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

Re: [PATCH for-4.15] x86/efi: enable MS ABI attribute on clang


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 4 Feb 2021 11:51:49 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=5lQajqzjCmtn8XyU9LT08gno0mI6BAEgeE81ME2gqHk=; b=KxbmU2XXJelCcPnV0DjitRKVBj5/ecqBoyuW4A0T36seaG2ppiTVfIQ5VQdH+v8RI3GflSZSbHU7D7dBRubynr/wXpCAZOnKEHDyy2VZcc8TsATjQnBCDQRM9jXKscSNA7M5d7eIPm4m3C8xkkHraFQG4qO2tCA5ZvEEMwj4gRzq6fVd8kHIctqOVRHmwWkbXyajpsXEt/3UF8cNDJXj8AloXycLOOdW1eLa2yMTbirof04owA73MZvyDynB86ATx7ePA+HiG6rziuq6MaQ/D7Zjhcay/rGRbEPoxD1KPWw8a29qrhK5i95SKB9bbU482K8SwJPTl7N/U8OTLuXlVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GuVYnd0xGlSTeNOzRv0yP7vNFCyzmtASTsnai/c72CG1TS9tt8J0eob26ZmX/f1FFtZLPlhfvjqa/clJ8PI5kXWOciGTv13HP/ITpBpsscHevfaWP/YpbZB39wVCoZq9YO8yBnDSvRBxTSxV6sImvoEjmz422NduXA+oSrnqzOiqRDqTFflwUz8MHGJhb3SGtIZNvDVfvJwkLhvQxvsQMm5hXjAt5ljdl/HGJgugRNfqX1phD5xTTYKVsU6JpkfFLAfp+bEerhbCmSvcKqJqJEpOjV6j9s94esGWQ3EdH400xI7b7X9HnDUNUusG8wlz0uNcItTtvwitwxhzSMFpPg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 04 Feb 2021 10:52:15 +0000
  • Ironport-sdr: uGbG+UD3iC1EjAthPx4SyCsupm7DUPuE5ErymwozDtPnVQH78fs+PfnHctzgP923I+0R+KglIg CSw07nBHeECfoRB7tt1weszsJ/XLqTJsp9sLQON4+wG/otkYDpVS5lXSh3mnsrhbSDy6+0TlAl eRqC/HBCQCuEeW4VdeaVSwiKENKyUzbdh2n1to97I9dBvsVemuStphP+VDph+g0c7/CXo2aJgx au0rMrPv1f4aRRU7dfkemBrC9Tvn26fn7J7PwCe2L+R22So9J3Q2lm+4SKpVSd242WHjPvAyqm 3Bc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Feb 04, 2021 at 11:27:17AM +0100, Jan Beulich wrote:
> On 03.02.2021 18:58, Roger Pau Monne wrote:
> > --- a/xen/include/asm-x86/x86_64/efibind.h
> > +++ b/xen/include/asm-x86/x86_64/efibind.h
> > @@ -172,7 +172,7 @@ typedef uint64_t   UINTN;
> >  #ifndef EFIAPI                  // Forces EFI calling conventions 
> > reguardless of compiler options
> >      #ifdef _MSC_EXTENSIONS
> >          #define EFIAPI __cdecl  // Force C calling convention for 
> > Microsoft C compiler
> > -    #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
> > +    #elif __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
> > 4)
> >          #define EFIAPI __attribute__((__ms_abi__))  // Force Microsoft ABI
> >      #else
> >          #define EFIAPI          // Substitute expresion to force C calling 
> > convention
> > 
> 
> So the problem is that some capable Clang versions set too low
> a __GNUC_MINOR__ (I'm observing 2 alongside __GNUC__ being 4
> on Clang5). The way the description and change are written
> made me rather imply __GNUC__ to not be available at all,
> which I then thought can't be the case because iirc we use it
> elsewhere.

Yes, I also see 4.2 on Clang 11.

Do you want me to expand the description by adding:

"Add a specific Clang check because the GCC version reported by Clang
is below the required 4.4 to use the __ms_abi__ attribute."

Thanks, Roger.



 


Rackspace

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