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

Re: [PATCH 1/4] x86/cpufeature: Rework {boot_,}cpu_has()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 May 2023 08:58:59 +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=Xf4m/fNBysdnyou13rBh+lZCp7x9fWpPN7KawNdIYnw=; b=jd/TggqwFdCfNh60Yno3rJhG2/zMysRsvFt+POh3dbDG/JwqKsfn08v8sBJvZXTZ/vHXBvT/foHEVcM+0i6sMIuOOJz7ls3FKgJEbq6DbxtZ6VPFjbf0t04r0aHgLiOKG0g3kKnitXJbQSly8k6nHBe9zv9WiiuuMHVx6W/4vdo2SRqSUAw08jiuvyd8LoMnl/0WxB6XgmtH1YOEwz/XlcXxxMJVbZMJtsu1YBo2Ltzb0mHmv4gpQctCkjMnp+3ChGzLv7EITIhCA6jWNKUB0BciCMvQRAD2/u3/LDlPgv67vIGjVNDn7uXkyv4gQuSb264SadkQX59TcarfnmAfWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UlFlcSWZpVH8gFlWDqIZysr5w7STkODWVX9Q0M3N6ojFYvhVuFcWs8BgMvHixManraDc788IV14m+ADFX65VSPSe3MyUZoZ77DvD07GPPVBscai07gxRVg35Mzs9xL+c9P+SNdWZnRlnfABAolS2n0Gf5RUUKFBws/xu3vpuLGX/z08hiNNzZaqXQHh1MAOSUAWKCwrhbH8+pi9lvzsYnD1wslY0FzLi5z0hAA8UWI6VWcNsql1SnZn6VPKVK/TL5lRN3Sep3E16VgMiOtDW57Ruz1EoVSuhP4+3nGyS9BI7HUm8dFPVrf59/8dceuSZ/zD95VDW5RZyHC0p4QTB2A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 May 2023 06:59:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.05.2023 17:24, Andrew Cooper wrote:
> On 17/05/2023 3:01 pm, Jan Beulich wrote:
>> On 16.05.2023 16:53, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/include/asm/cpufeature.h
>>> +++ b/xen/arch/x86/include/asm/cpufeature.h
>>> @@ -7,6 +7,7 @@
>>>  #define __ASM_I386_CPUFEATURE_H
>>>  
>>>  #include <xen/const.h>
>>> +#include <xen/stdbool.h>
>>>  #include <asm/cpuid.h>
>> This isn't needed up here, and ...
>>
>>> @@ -17,7 +18,6 @@
>>>  #define X86_FEATURE_ALWAYS      X86_FEATURE_LM
>>>  
>>>  #ifndef __ASSEMBLY__
>>> -#include <xen/bitops.h>
>> ... putting it here would (a) eliminate a header dependency for
>> assembly sources including this file (perhaps indirectly) and (b)
>> eliminate the risk of a build breakage if something was added to
>> that header which isn't valid assembly.
> 
> b) That's a weak argument for headers in general, but you're saying it
> about our copy of stdbool.h which probably the least likely header for
> that ever to be true.
> 
> a) Not really, because cpuid.h pulls in a reasonable chunk of the world,
> including types.h and therefore stdbool.h.  cpuid.h is necessary to make
> the X86_FEATURE_ALWAYS -> X86_FEATURE_LM, which is used by asm for
> alternatives.
> 
> I'm tempted to just omit it.  cpufeature.h has one of the most tangled
> set of headers we've got, and I can't find any reasonable way to make it
> less bad.

Yeah, omitting would certainly be fine with me.

Jan



 


Rackspace

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