From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8C91C47083 for ; Thu, 3 Jun 2021 02:37:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8813661027 for ; Thu, 3 Jun 2021 02:37:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbhFCCji (ORCPT ); Wed, 2 Jun 2021 22:39:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30714 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbhFCCjh (ORCPT ); Wed, 2 Jun 2021 22:39:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622687872; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUYE0hKN7YEQF+2Ypg+MzgNttYvXIr9euaI0jYyales=; b=QuCCXBYW7rPeX4GpxoxRlEr6S9oUwJXd6H8JByAbddyPpPIojo+7uUjw+iYBTDhSkXdTpR 8TGRgqytn0yF3tH9FiAOWa9g/sTATGKHOiVCKGoePZ1hCADG4mcexIBUou6zkWesforUZy mFL7o7pT4lUX75LGEXmckncGu5FijCo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96-ARxJlbgbO0yi7ZDTXMoQJA-1; Wed, 02 Jun 2021 22:37:50 -0400 X-MC-Unique: ARxJlbgbO0yi7ZDTXMoQJA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B202C100945E; Thu, 3 Jun 2021 02:37:49 +0000 (UTC) Received: from [10.64.54.205] (vpn2-54-205.bne.redhat.com [10.64.54.205]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F7CA163C3; Thu, 3 Jun 2021 02:37:47 +0000 (UTC) Reply-To: Gavin Shan To: robh@kernel.org Cc: Andrew Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Shan Gavin From: Gavin Shan Subject: [Question] Format of memory node name Message-ID: Date: Thu, 3 Jun 2021 14:38:50 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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/