From nobody Wed Oct 29 09:32:10 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524822953917675.0366703882854; Fri, 27 Apr 2018 02:55:53 -0700 (PDT) Received: from localhost ([::1]:46880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC06b-00082r-2q for importer@patchew.org; Fri, 27 Apr 2018 05:55:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBzag-0002LP-0t for qemu-devel@nongnu.org; Fri, 27 Apr 2018 05:22:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBzaf-0002OL-4x for qemu-devel@nongnu.org; Fri, 27 Apr 2018 05:22:54 -0400 Received: from ozlabs.org ([203.11.71.1]:49745) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBzae-0002MR-P9; Fri, 27 Apr 2018 05:22:53 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40XT2w56H8z9sY4; Fri, 27 Apr 2018 19:21:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1524820904; bh=nzWol65eufteZqihrBCI2+akt6eW8La4+1WL/CQB5rc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzoX7eAIxlBkNQCPouMFcezf8gtItbYkiBBvwUUJ1xolj0NxLA/cSaEhutEsXhHs4 FXKs3FmKnmI7iOPLc8jkJQyUPotKvzMpLEz/NRUD6A2Yn9JHb5ZHISuwamt8iQjWa6 tGxrtNH71slYT7n1HgYDVjLYiEo+9ylU1ABQwSzc= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 27 Apr 2018 19:21:21 +1000 Message-Id: <20180427092126.24812-45-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180427092126.24812-1-david@gibson.dropbear.id.au> References: <20180427092126.24812-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 44/49] spapr: Add ibm, max-associativity-domains property X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Serhii Popovych , qemu-ppc@nongnu.org, groug@kaod.org, David Gibson , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Serhii Popovych Now recent kernels (i.e. since linux-stable commit a346137e9142 ("powerpc/numa: Use ibm,max-associativity-domains to discover possible node= s") support this property to mark initially memory-less NUMA nodes as "possible" to allow further memory hot-add to them. Advertise this property for pSeries machines to let guest kernels detect maximum supported node configuration and benefit from kernel side change when hot-add memory to specific, possibly empty before, NUMA node. Signed-off-by: Serhii Popovych Signed-off-by: David Gibson --- hw/ppc/spapr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 8c2e3ccb89..2203b6f46d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -909,6 +909,13 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, vo= id *fdt) 0, cpu_to_be32(SPAPR_MEMORY_BLOCK_SIZE), cpu_to_be32(max_cpus / smp_threads), }; + uint32_t maxdomains[] =3D { + cpu_to_be32(4), + cpu_to_be32(0), + cpu_to_be32(0), + cpu_to_be32(0), + cpu_to_be32(nb_numa_nodes ? nb_numa_nodes - 1 : 0), + }; =20 _FDT(rtas =3D fdt_add_subnode(fdt, 0, "rtas")); =20 @@ -945,6 +952,9 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, voi= d *fdt) _FDT(fdt_setprop(fdt, rtas, "ibm,associativity-reference-points", refpoints, sizeof(refpoints))); =20 + _FDT(fdt_setprop(fdt, rtas, "ibm,max-associativity-domains", + maxdomains, sizeof(maxdomains))); + _FDT(fdt_setprop_cell(fdt, rtas, "rtas-error-log-max", RTAS_ERROR_LOG_MAX)); _FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate", --=20 2.14.3