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

Re: [PATCH v8 5/5] xen/x86: switch x86 to use generic implemetation of bug.h


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 09:15:11 +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=RLUm2dX2Z5EJl8PrVBg6l86Q535A0KvN1z5s0boiVVw=; b=KvxvUxOpv3QVS20zzyJuOomg4rsJbjPAAb6i3e/qecI+RsegkyGuAjNSvxlmjHruqI0hgwQ72crqLs4rsb/uwmdMyD+nUys60NzvHhfv6tmd7AzVaQFfbCbjaTCYZZij9kiGNuyRyzij6ovULJNEMBmv4h4jWfM6/eCkjoEdX6rr0Y0Qvz4O+22qv+9x67hicgqaKA5AhV4C/loQeeE57LbzJsThrcyVcXKKpdNCRA5kQrGO0OzJ0CR07DzkyHjpNUw4sqGhWimyD5Nf3wjK+VHohx9zj1oOGS8duGXVGx0wilrRNT9aZ7fac1dvskR5RIFv2mKzCfcUTKsH6/lUFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KlgUdrLaPOw+5Quw3MUy7UwIUwxq3D6vbvVQKZp1EkO8SCxIsCaKDJKpdwwULIpKSqK9qwQ0gTRh+pHA9qhpLGUywxHSiyEDfbRjsq8N5RXOGYkgc3BR2SZP3BQq1zrRmQ8ALaV8JHVUGqZBG2k81HLOE72EovddhnR+v2aZd6n5ySPgTYZux10bpHVqBVcue0+WfLmzQdWrWn5eXdqetMcvaKDJs35CQhcvf4mOL3ZOBhQ0tcuPN+MBjcDtBjYrC14k+fJDZ43YEM+HjRSwG03nShUKtkBg0bq2eJCSunlJEb38PBdYQxtYh4N8Swt+Tp9G0Mki5x3m9gWYCYRI3A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 29 Mar 2023 07:15:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.03.2023 18:55, Oleksii wrote:
> On Tue, 2023-03-28 at 19:38 +0300, Oleksii wrote:
>> On Tue, 2023-03-28 at 18:38 +0300, Oleksii wrote:
>>> offsets.s arch/x86/x86_64/asm-offsets.c
>>> In file included from ./include/public/domctl.h:21,
>>>                  from ./include/public/sysctl.h:18,
>>>                  from ./arch/x86/include/asm/cpuid.h:14,
>>>                  from ./arch/x86/include/asm/cpufeature.h:10,
>>>                  from ./arch/x86/include/asm/system.h:7,
>>>                  from ./arch/x86/include/asm/atomic.h:5,
>>>                  from ./include/xen/gdbstub.h:24,
>>>                  from ./arch/x86/include/asm/debugger.h:10,
>>>                  from ./include/xen/debugger.h:24,
>>>                  from ./arch/x86/include/asm/bug.h:6,
>>>                  from ./include/xen/bug.h:15,
>>>                  from ./arch/x86/include/asm/alternative.h:7,
>>>                  from ./arch/x86/include/asm/bitops.h:8,
>>>                  from ./include/xen/bitops.h:106,
>>>                  from ./arch/x86/include/asm/smp.h:8,
>>>                  from ./include/xen/smp.h:4,
>>>                  from ./include/xen/perfc.h:7,
>>>                  from arch/x86/x86_64/asm-offsets.c:9:
>> And again the problem is that x86's <asm/bug.h> includes
>> <xen/debugger.h> which somewhere inside uses BUG() which will be
>> defined after we will back for x86's <asm/bug.h> to <xen/bug.h> where
>> BUG() is defined.
>>
>> So it looks like we can't include to <asm/bug.h> something that will
>> use functionality defined in <xen/bug.h>...
>>
>> Thereby I don't see better option that include <xen/debugger.h> in
>> <common/bug.c> instead of <asm/bug.h>

Well, to deal with this specific issue we could re-arrange xen/perfc.h
a little (to skip part of it when COMPILE_OFFSETS is defined), but it
seems quite likely that then the same issue would surface yet again
elsewhere. So yes, for the time being I guess we need to go with what
you have. Until we can sort the xen/lib.h vs xen/bug.h aspect.

> Or as an option we can include <xen/bug.h> in <asm/bug.h> instead of
> include <asm/bug.h> in <xen/bug.h> it will allow us to resolve an
> issue...
> 
> Do you think this option will be better?

No, imo that arrangement should remain as is.

Jan



 


Rackspace

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