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

Re: [PATCH 1/3] xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 22 Nov 2023 08:54:57 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org 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 (0)
  • 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=8ytBlivuCZKQdBZz6Sk2+hSBkBvIwKeydrGsVB+kWIc=; b=DC9+Nuf5fF/hsQZICTTdkaVWB9myCzps0bJg59H7rOQdVlk9ZPSrTrGt0FRJoa7m0ZB8Mh+qko0b9nq79GH7LE/LHq6bsA3vgSMmvwtxol+QMG8fuZbGGiARY1GY7L2ApZ9azpmwiFfGJmjgt+JtgbGlaYe0klbyQAebuS21G/Lyihcz0P7FbCSONy1cK4ofKm1n41IXJdqmRZxjfydQ+LMHfgHWjHQgmEK1efKL06pPufP+hsnbyQ32kCA5zA+my99FSseLi3hcoVXQcq8prFnQ+bRuHC0CwgDgRfO9EySoDNY628oktdfCN889T6YEiTJJ7441nivb5edvv85iNQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LSCJTn8sInPYq9dfsZbNkTfjZ+1FC0uME8AZrba/r6+4HKHZaIr26h7g9vOrfP+aevyBF3PzOEi8yY9UC2VY/4EFAsbQugeM+Lg3c3B2cdEvyapUYtV6rCh5dpqY+mBcJeeTFsc3S8Hvdi5eAYpVB/4mW6PU4+gsJb3u+YKCLVXq+zUOx18j8ex2ebPLN8x6j1Pv3YbRPGFf50erDKAVEZXYMiqZKpIAcF0LZ4ETsKyN6anCcPuRX5iQY6KwqvLQdXAj53JkFwMVAnPN+7PeFAYQe8IzGKbgD97mKhGwOeq6dD0cQ0B5+L6cMLgFz9tNBbe7Z/tId/Jc9lraiSG9QQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 22 Nov 2023 07:55:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

On 21/11/2023 19:31, Julien Grall wrote:
> 
> 
> Hi Michal,
> 
> On 21/11/2023 17:18, Michal Orzel wrote:
>>
>>
>> On 21/11/2023 18:04, Julien Grall wrote:
>>>
>>>
>>> On 21/11/2023 17:00, Michal Orzel wrote:
>>>> Hi Julien,
>>>
>>> Hi,
>>>
>>>> On 21/11/2023 17:09, Julien Grall wrote:
>>>>>
>>>>>
>>>>> Hi Michal,
>>>>>
>>>>> On 21/11/2023 09:45, Michal Orzel wrote:
>>>>>> At the moment, the 'hex' string is placed right after the 'putn'
>>>>>> function in the .text section. This is because of the limited range
>>>>>> (+/- 1MB) of PC relative 'adr' instruction 'putn' uses. Modify it to use
>>>>>> 'adr_l' instead (range extended to +/- 4GB) and move the string to
>>>>>> .rodata.str. This way all the earlyprintk messages will be part of 
>>>>>> .rodata
>>>>>> and the behavior will be consistent with what we already do on arm32.
>>>>>
>>>>> This will be correct today, but I am actually thinking to move 'hex' to
>>>>> .rodata.idmap so it can be used while we are on the 1:1 mapping and/or
>>>>> temporary mapping.
>>>> So you are planning on extending your series to also cover arm64?
>>>
>>> It is not in my soonish plan. But you are arguing that this patch is for
>>> consistency with arm32. This will not be after my series.
>> Hmm, consistency was not the only reason for sending this patch. It's a 
>> beneficial side effect
>> given that putn implementations are very similar on arm32/arm64.
>> Are you saying that
>> moving a string that is const from .text to .rodata is not a good change?
> 
> .rodata is better but I would rather prefer if this is moved to
> .rodata.idmap directly.
> 
>>
>>>
>>> And I would not change arm64 just for consistency because I don't view
>>> it as necessary. The boot code is already not the same.
>> I don't recall trying to make the entire boot code consistent. But if there 
>> are parts that
>> are almost identical, I think symmetry is welcomed. It helps reading the 
>> code, at least for me.
> 
> If you want symmetry, then I am happy to switch to .rodata.idmap. But I
> would rather not first move to .rodata and then in a month time switch
> to .rodata.idmap.
Ok, fair enough.

~Michal



 


Rackspace

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