devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: robh@kernel.org
Cc: Andrew Jones <drjones@redhat.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shan Gavin <shan.gavin@gmail.com>
Subject: [Question] Format of memory node name
Date: Thu, 3 Jun 2021 14:38:50 +1000	[thread overview]
Message-ID: <ed20264b-1fe3-59e2-7c95-d1a224d22b7f@redhat.com> (raw)

Hi Rob,

Currently, I'm looking into one QEMU bug which is related to FDT memory
nodes. The story is 4 NUMA nodes are specified by the command line, which
is used to start the VM. QEMU needs to create 4 FDT memory nodes for them
and their names are following the format (memory@unit-address) as stated
in the device-tree specification. The 'unit-address' is base address in
'reg' property. Unfortunately, one NUMA node's base address is exactly
same to another one. It means there are two conflicting two memory node
because of their names. It leads to the FDT can't be populated successfully.

For example, the last memory node can't be created because of its conflicting
name in the following scheme.

    NUMA ID       Base address       End address      Memory node name
    -------------------------------------------------------------------
    0             0x00000000         0x20000000       memory@00000000
    1             0x20000000         0x40000000       memory@20000000
    2             0x40000000         0x40000000       memory@40000000
    3             0x40000000         0x40000000       memory@40000000

I'm trying to resolve the issue. There are two options as below. However,
it's not certain the solution will beak the device-tree specification. So
I'm checking with you on this.

(1) Replace the 'unit-address' with NUMA ID
     memory@0
     memory@1
     memory@2
     memory@3

(2) Add suffix to the conflicting memory node names
     memory@00000000
     memory@20000000
     memory@40000000
     memory@40000000-0

Thanks,
Gavin

[link] https://patchwork.kernel.org/project/qemu-devel/patch/20210601073004.106490-1-gshan@redhat.com/


                 reply	other threads:[~2021-06-03  2:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ed20264b-1fe3-59e2-7c95-d1a224d22b7f@redhat.com \
    --to=gshan@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drjones@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shan.gavin@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).