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

Re: [PATCH v2 2/2] xen: Populate xen.lds.h and make use of its macros


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 30 Mar 2022 12:42:08 +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=LQAV2DtwZXCxg76FUOIWzKCpHtFyPJIgRiqVtRiMs5I=; b=eiMAyj3NXES15o512aFxEydH4h+FLvt7YELzR20e3j4z4hku1r5WOULWJAypOQEd0q+3xReCvy0AXJQ6uPS1Cd75ApTN2zeEGzHBI9uAnNAtp2XTeFMsEo96k0C8mSPzNaA2TsD37wexLRp+rbxnkX5bqfj5LJObuiJbELCSevh0T75thtKlTEzzmRrKYOPpUeDEctn8PdDt9WFuDW4bQsQlcPWiW1hGtMWZh7LxkDKwZYD7jDYITvCaaSVy+Atoo4ru0uDHE+SczH5bbaiP7StvaHVmIr5Mf1nER1QVsaG2ABKLlZsvXobowbIn2ia9FJwgK77xKyQ/CRNVwOLtsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B4rJWjs5CpCwHkaJ2Q/IjO+yX10yHZ5k5H9bfaFlDottrskFwStvO6quE8mVZQTnTw9LA4mVtGUkmpZn/+M5dY4HpVQJ4tokuCJoVDGadnbhiOG2k/X5/WHTTLtWhkgKfYMG+cpwn8DO0TXQz/W2/2EH6oqXzGMtKr7+2p4eDRB7O0/4i1SE9NmLLizvBctgpaflyXamxvm313z8HAGzPPAx/a0hddObbh3fnbFqjbMruDginahgp783v7BdXrY9A4f1rtdJ3OXzJC/ilHZC04Gggs7ja0V1iaAlZFnrw4PZNyDwuzjzNOKWBZh/WeGfG0OYenXN+5oJbGXN3w5n8Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 30 Mar 2022 10:42:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.03.2022 12:32, Julien Grall wrote:
> On 29/03/2022 12:42, Jan Beulich wrote:
>> On 29.03.2022 12:54, Julien Grall wrote:
>>> On 29/03/2022 11:12, Michal Orzel wrote:
>>>> On 29.03.2022 11:54, Julien Grall wrote:
>>>>> On 22/03/2022 08:02, Michal Orzel wrote:
>>>>>> --- a/xen/include/xen/xen.lds.h
>>>>>> +++ b/xen/include/xen/xen.lds.h
>>>>>> @@ -5,4 +5,104 @@
>>>>>>      * Common macros to be used in architecture specific linker scripts.
>>>>>>      */
>>>>>>     +/* Macros to declare debug sections. */
>>>>>> +#ifdef EFI
>>>>>
>>>>> AFAIK, we don't define EFI on Arm (just CONFIG_EFI). Yet we do support 
>>>>> EFI on arm64.
>>>>>
>>>>> As this #ifdef is now in generic code, can you explain how this is meant 
>>>>> to be used?
>>>>>
>>>> As we do not define EFI on arm, all the stuff protected by #ifdef EFI is 
>>>> x86 specific.
>>>
>>> I find the name "EFI" too generic to figure out that this code can only
>>> be used by x86.
>>>
>>> But, from my understanding, this header is meant to contain generic
>>> code. It feels a bit odd that we are moving arch specific code.
>>>
>>> To be honest, I don't quite understand why we need to make the
>>> diffferentiation on x86. So I guess the first question is how this is
>>> meant to be used on x86?
>>
>> We produce two linker scripts from the single source file: One (with EFI
>> undefined) to link the ELF binary, and another (with EFI defined) to link
>> the PE/COFF output. If "EFI" is too imprecise as a name for the identifier,
>> I wouldn't mind renaming it (to PE_COFF?), but at the same time I'm not
>> convinced this is really necessary.
> 
> Thank for the explanation (and the other ones in this thread). You are 
> right the confusion arised from "generating" vs "linking".
> 
> Renaming to PE_COFF may help to avoid the confusion with CONFIG_EFI. 
> That said, it would possibly make more difficult to associate the flag 
> with "linking an EFI binary".

Indeed. And EFI_PE_COFF is getting a little unwieldy for my taste.

> I think some documentaion about the define EFI would be help so there 
> are no more confusion between CONFIG_EFI/EFI. But I am not sure where to 
> put it. Maybe at the top of the header?

That's perhaps the best place, yes.

Jan




 


Rackspace

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