All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Ayan Kumar Halder <ayankuma@amd.com>
Cc: Julien Grall <julien@xen.org>,
	Michal Orzel <michal.orzel@amd.com>,
	 Stefano Stabellini <sstabellini@kernel.org>,
	 Ayan Kumar Halder <ayan.kumar.halder@amd.com>,
	 xen-devel@lists.xenproject.org, stefano.stabellini@amd.com,
	 Volodymyr_Babchuk@epam.com, bertrand.marquis@arm.com
Subject: Re: [XEN v2 02/11] xen/arm: Use the correct format specifier
Date: Fri, 20 Jan 2023 15:01:22 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2301201455100.731018@ubuntu-linux-20-04-desktop> (raw)
In-Reply-To: <0a7d3da6-efe7-2cf1-563a-3c5c2ec473b2@amd.com>

[-- Attachment #1: Type: text/plain, Size: 3771 bytes --]

On Fri, 20 Jan 2023, Ayan Kumar Halder wrote:
> Hi Julien/Michal,
> 
> On 20/01/2023 17:49, Julien Grall wrote:
> > 
> > 
> > On 20/01/2023 16:03, Michal Orzel wrote:
> > > Hi Julien,
> > 
> > Hi Michal,
> > 
> > > 
> > > 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@amd.com>
> > > > > > > 
> > > > > > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> > > > > > 
> > > > > > 
> > > > > > 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.
> > 
> > Can either you or Ayan look at it?
> 
> Does this change match the expectation ?
> 
> diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh
> b/automation/scripts/qemu-smoke-dom0less-arm64.sh
> index 2b59346fdc..9f5e700f0e 100755
> --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh
> +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh
> @@ -20,7 +20,7 @@ if [[ "${test_variant}" == "static-mem" ]]; then
>      domu_size="10000000"
>      passed="${test_variant} test passed"
>      domU_check="
> -current=\$(hexdump -e '16/1 \"%02x\"'
> /proc/device-tree/memory@${domu_base}/reg 2>/dev/null)
> +current=\$(hexdump -e '16/1 \"%02x\"' /proc/device-tree/memory@$[0-9]*/reg
> 2>/dev/null)
>  expected=$(printf \"%016x%016x\" 0x${domu_base} 0x${domu_size})
>  if [[ \"\${expected}\" == \"\${current}\" ]]; then
>         echo \"${passed}\"

We need to check for ${domu_base} with or without leading zeroes:

current=\$(hexdump -e '16/1 \"%02x\"' /proc/device-tree/memory@*(0)${domu_base}/reg 2>/dev/null)

  reply	other threads:[~2023-01-20 23:02 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 17:43 [XEN v2 00/11] Add support for 32 bit physical address Ayan Kumar Halder
2023-01-17 17:43 ` [XEN v2 01/11] xen/ns16550: Remove unneeded truncation check in the DT init code Ayan Kumar Halder
2023-01-17 17:43 ` [XEN v2 02/11] xen/arm: Use the correct format specifier Ayan Kumar Halder
2023-01-19 22:54   ` Stefano Stabellini
2023-01-20  9:32     ` Julien Grall
2023-01-20 11:09       ` Ayan Kumar Halder
2023-01-20 14:40       ` Michal Orzel
2023-01-20 15:09         ` Julien Grall
2023-01-20 16:03           ` Michal Orzel
2023-01-20 17:49             ` Julien Grall
2023-01-20 18:08               ` Ayan Kumar Halder
2023-01-20 23:01                 ` Stefano Stabellini [this message]
2023-01-21 10:24                   ` Michal Orzel
2023-01-17 17:43 ` [XEN v2 03/11] xen/arm: domain_build: Replace use of paddr_t in find_domU_holes() Ayan Kumar Halder
2023-01-19 23:02   ` Stefano Stabellini
2023-01-20  9:48     ` Julien Grall
2023-01-20  9:52       ` Julien Grall
2023-01-17 17:43 ` [XEN v2 04/11] xen/arm: Typecast the DT values into paddr_t Ayan Kumar Halder
2023-01-19 23:20   ` Stefano Stabellini
2023-01-19 23:34     ` Stefano Stabellini
2023-01-20 10:16       ` Julien Grall
2023-01-31 10:51         ` Ayan Kumar Halder
2023-01-31 15:57           ` Julien Grall
2023-01-17 17:43 ` [XEN v2 05/11] xen/arm: Use paddr_t instead of u64 for address/size Ayan Kumar Halder
2023-01-18  8:40   ` Jan Beulich
2023-01-18 11:15     ` Ayan Kumar Halder
2023-01-18 13:14       ` Jan Beulich
2023-01-18 13:34         ` George Dunlap
2023-01-18 13:58           ` Jan Beulich
2023-01-18 14:45             ` George Dunlap
2023-01-19 23:24   ` Stefano Stabellini
2023-02-06 19:21     ` Ayan Kumar Halder
2023-02-07  9:03       ` Julien Grall
2023-02-07 10:59         ` Ayan Kumar Halder
2023-02-07 12:18           ` Julien Grall
2023-01-20 10:34   ` Julien Grall
2023-01-17 17:43 ` [XEN v2 06/11] xen/arm: Introduce a wrapper for dt_device_get_address() to handle paddr_t Ayan Kumar Halder
2023-01-19 23:35   ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 07/11] xen/arm: smmu: Use writeq_relaxed_non_atomic() for writing to SMMU_CBn_TTBR0 Ayan Kumar Halder
2023-01-19 23:40   ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 08/11] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_ARM_PA_32" Ayan Kumar Halder
2023-01-19 23:43   ` Stefano Stabellini
2023-01-20 10:39     ` Julien Grall
2023-01-17 17:43 ` [XEN v2 09/11] xen/arm: Introduce ARM_PA_32 to support 32 bit physical address Ayan Kumar Halder
2023-01-18  8:50   ` Jan Beulich
2023-01-18 11:57     ` Ayan Kumar Halder
2023-01-18 13:19       ` Jan Beulich
2023-01-19 23:48         ` Stefano Stabellini
2023-01-18  9:18   ` Julien Grall
2023-01-30 22:00   ` Julien Grall
2023-01-17 17:43 ` [XEN v2 10/11] xen/arm: Restrict zeroeth_table_offset for ARM_64 Ayan Kumar Halder
2023-01-20  0:19   ` Stefano Stabellini
2023-01-20 10:53     ` Julien Grall
2023-01-20 16:53       ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 11/11] xen/arm: p2m: Enable support for 32bit IPA Ayan Kumar Halder
2023-01-20  0:05   ` Stefano Stabellini
2023-01-20 11:06   ` Julien Grall
2023-02-07 15:34     ` Ayan Kumar Halder
2023-02-09 11:45       ` Julien Grall
2023-02-10 15:39         ` Ayan Kumar Halder
2023-02-10 16:19           ` Julien Grall
2023-02-10 17:51             ` Ayan Kumar Halder
2023-02-10 17:58               ` Julien Grall
2023-01-18 10:12 ` [XEN v2 00/11] Add support for 32 bit physical address Michal Orzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2301201455100.731018@ubuntu-linux-20-04-desktop \
    --to=sstabellini@kernel.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=ayan.kumar.halder@amd.com \
    --cc=ayankuma@amd.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=stefano.stabellini@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.