[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: Tue, 21 Nov 2023 18:18:27 +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=qnOskI6WWO0cXC48DYa5rmbPVghd5aU+26T/jbeh1iM=; b=FmeQHEMrQFEzoHCmxnbDz1t/BGDoBFILR48ZUlha1DSdCSOlYzqa/50Ndrb3/TDhqOggF7x/cDCz1jn4f1ybw+JOoixSrYiYhN8zTEzSyisfjoP/c0NWjx+9H1rCb1ZDwCuEo3nJUlnW/wn917g5o/cy2PX4GjUsraFrBJPKKMgfwJvAGVGEgV6cR5S0TPGCPogSPwwRpHYe7Of7xRmJf55UBPBaOpkJ7gwD/fQqGUSvrbzJrc/ddyaMO974csfeYdTa9O8xru103oYloA5dZ2OEPZSALkHn2OEtpTa5AtX7VZ7IJO1SAT0J4YeFFbvhf4JM9ejfGvstQc+oSBs/qw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JgksNS888DMA1Vf0uLJS5Jn/QTXXzFIgZxdtdJG+FjHwKKSwHn0hI8bXjeY8PWY3fZBXwLZo0GB/P2p5o38u1ZofJuvpH6DKAnpGBmfkE0udPDqA6TfIAQUocXLYxDvJzvbdGxegmfMDI+VgBu/GhH0AwuEf8yiRtF+1e+0CSJB2FWhQTiaiKxmInJ45dF/HE9hKWSZwo1XB3Lwjln6+4NoEcvXG6oiKMXOQtFAc6KQlCIc9ZAMikCAdbIUIWZ3bYWq7N1ur+nb5kY2i76uxaXu2WweOMgrxxrpMY6TkCWydKdnDTeZTI/rmOAXugfQYaRMMq/0YOZjV213dNlUGBA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 21 Nov 2023 17:18:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


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?

> 
> 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.

~Michal



 


Rackspace

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