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

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 20 Jan 2023 17:03:31 +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
  • 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=WAYvzcLgC+VmA+eUVGn/Va5dzSjMM1zIXoiSSZqCQC8=; b=PXtC9VAWvLtFBZzVXdwRaHQupw+KFwpg+VGPCrl0Rgo0/F8DlPxmhpgAmXokMAjX+OrIPLcoPqqPPfWlfYMnh/+DQhUsyztSTZExSyKZHpuxxUwis1Ofl4DKvoShcSvli45cZRgkIOrP9auxvBFMZHuotpCw+csSA5TsDrn7MBeryTl3k+rrbJaEEzThStxtA2B5hAjWG/jucTAJjE6uQF4HXx54fk82hDDB2l0EVvZYAjcHMsgABStMLpPjQdegYMYNbWeetrQtUYn/fwezHovX9RfH3XdAHilIMRd6VCwFPWJQq1zqhQuBuEc3SLql2FfT4mx4V3zCNePalCrRVw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQXdluOwXLyM5mVhZXeEJP0pNTQhCdSkwNcuO1qK/QTn+i6MEiBE2GgTDaCdN6zOkNQn0/cGZiexGw2kB0aNrzCIx1wm6RromiLVjPBp5v0zJWuYRTPfNMDeY8NwK0nXyF+tbnUaxKxpactFE/J4UZ/TkEOVsd+IVO72979+xsIPTcCaOTk73wsTpnvRsXXwAuUok7Wg+uUHmz1lDp+C0ddDH1j33vvf8p8OYtl1mtl1o4sYvcqass8jlP8tUdqHBXTae6Tar8wqmjBcpzrjPvs+BTX8Ytuai0LDdsGPbhI9sveOV00rJ+57vssHVh3OuWpg/yxXQI2qb8mnL478KA==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>
  • Delivery-date: Fri, 20 Jan 2023 16:03:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 20/01/2023 16:09, Julien Grall wrote:
> 
> 
> On 20/01/2023 14:40, Michal Orzel wrote:
>> Hello,
> 
> Hi,
> 
>>
>> On 20/01/2023 10:32, Julien Grall wrote:
>>>
>>>
>>> Hi,
>>>
>>> On 19/01/2023 22:54, Stefano Stabellini wrote:
>>>> On Tue, 17 Jan 2023, Ayan Kumar Halder wrote:
>>>>> 1. One should use 'PRIpaddr' to display 'paddr_t' variables.
>>>>> 2. One should use 'PRIx64' to display 'u64' in hex format. The current
>>>>> use of 'PRIpaddr' for printing PTE is buggy as this is not a physical
>>>>> address.
>>>>>
>>>>> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
>>>>
>>>> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>>>
>>>
>>> I have committed the patch.
>> The CI test jobs (static-mem) failed on this patch:
>> https://gitlab.com/xen-project/xen/-/pipelines/752911309
> 
> Thanks for the report.
> 
>>
>> I took a look at it and this is because in the test script we
>> try to find a node whose unit-address does not have leading zeroes.
>> However, after this patch, we switched to PRIpaddr which is defined as 
>> 016lx/016llx and
>> we end up creating nodes like:
>>
>> memory@0000000050000000
>>
>> instead of:
>>
>> memory@60000000
>>
>> We could modify the script,
> 
> TBH, I think it was a mistake for the script to rely on how Xen describe
> the memory banks in the Device-Tree.
> 
> For instance, from my understanding, it would be valid for Xen to create
> a single node for all the banks or even omitting the unit-address if
> there is only one bank.
> 
>> but do we really want to create nodes
>> with leading zeroes? The dt spec does not mention it, although [1]
>> specifies that the Linux convention is not to have leading zeroes.
> 
> Reading through the spec in [2], it suggested the current naming is
> fine. That said the example match the Linux convention (I guess that's
> not surprising...).
> 
> I am open to remove the leading. However, I think the CI also needs to
> be updated (see above why).
Yes, the CI needs to be updated as well.
I'm in favor of removing leading zeroes because this is what Xen uses in all
the other places when creating nodes (or copying them from the host dtb) 
including xl
when creating dtb for domUs. Having a mismatch may be confusing and having a 
unit-address
with leading zeroes looks unusual.

> 
> Cheers,
> 
> [2] https://www.devicetree.org/
> 
> --
> Julien Grall

~Michal




 


Rackspace

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