From nobody Thu Nov 28 03:51:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=flygoat.com ARC-Seal: i=1; a=rsa-sha256; t=1724179406; cv=none; d=zohomail.com; s=zohoarc; b=oBsfzNpL0tAd+Q+cg/83iJaJfBe56p1SjJM+PHRZsOOs+Pol6c2Ici5Uf5EBsKXs+anqsSfiZ+Y05Oo9S5m+Rlnx56gpi9YFQ7qx/NPR2z3R0G98BMCOlihF9kbOeNdABupTKo/7OMLlfTm/co+YBbV+yjSmGZhXCe5idWVvUOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724179406; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gs8BALBeDHGgfJ4K2G0dvJYV2tKaeJvz92mj0hs27Qc=; b=iufA5XwN1K8YPNB7pGOFJWZmL+v6orUxy+mimr+zYwn+7K3yLQ/ZDnE4WW5Hm2yfXLD4c0kjXX/LNJxpWLXTy+/4xikLMuPqCqz82U6OYu4q7HMlkivK2JMJplZLrpiZ1pM0zMoDjx7jHEmiKVXqulu6+2wVfwKssaeY/8HYbgA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1724179406142193.81369642274467; Tue, 20 Aug 2024 11:43:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgToa-0007ov-GQ; Tue, 20 Aug 2024 14:42:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgToY-0007oQ-Tz for qemu-devel@nongnu.org; Tue, 20 Aug 2024 14:42:42 -0400 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgToX-0003T1-3o for qemu-devel@nongnu.org; Tue, 20 Aug 2024 14:42:42 -0400 Received: from phl-compute-04.internal (phl-compute-04.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id B3500114EA9D; Tue, 20 Aug 2024 14:42:37 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 20 Aug 2024 14:42:37 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Aug 2024 14:42:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm2; t=1724179357; x=1724265757; bh=gs 8BALBeDHGgfJ4K2G0dvJYV2tKaeJvz92mj0hs27Qc=; b=RM7xMcS5ohP7u3dAE1 FTMhYj47m5/YeyHSAYHvnpDJ7xtU8lsWv/Al1DawuYpHkq6Ak9Se9Bwuqq0cctP3 SGUtDV963RqGk1nEXpIz81d9M5hilSqgEHUzhwoCIl9BYdBOXfzkW6neMVMgzZ6f oLk2hO0EGSvajLJET8eEQPngQFrYlH76kjoMRYBPbZw5w2iAYkIIgkA2ICkiMbuc HIezBn5aWLwqC6PgCPP+dwLTuKd/kgV3UL4BK3TeO0LRRQQLDp09wyzW2gqlzWvP YGrv7B14m/5VceJ38L5EmLLjnGHp5kId62Hv1vCKOYZSU/FNXDcgMRmQHQbD2Cyx U06w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1724179357; x=1724265757; bh=gs8BALBeDHGgf J4K2G0dvJYV2tKaeJvz92mj0hs27Qc=; b=r7i/kOYPw59tBsrgpSVbUmx+3AeI3 lCTN01Xt8La3OQIJvZpZ6u6hmlNfQsLZmUodX308HPiwRHspQOuasuWxu3DcHPFB PXvavP3LxessQdR+AqKxUNsPCEE4eNvGc9d3jYXUhivMvmtHtyHysSldE6svnxoD hWzzORATd4EVgY9THrqHcwtX8qnFr0ttwF07GjzChHBoIuzGgpzIHqCWFc/NOr/Q AMOLd/XQV3+JfidDFcEl2beMUFCV9DUpIWlaEAqYiNc+SNauthuGwQ1QeASivYE1 hauz8Aldg2dHJnBrdrqhmqvgWAV/N/JM+mQlx8c1qGK4jLd5E1LGF7dwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudduiedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkvfevofesthejredtredtjeen ucfhrhhomheplfhirgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihgh horghtrdgtohhmqeenucggtffrrghtthgvrhhnpeffteeugeektdfgjeevuedvgffhgedt vdfghedugefhgeehteeuudehudevjeethfenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgt ohhmpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgpdhrtghpthhtohepjhhirgiguhhn rdihrghnghesfhhlhihgohgrthdrtghomhdprhgtphhtthhopehgrghoshhonhhgsehloh honhhgshhonhdrtghnpdhrtghpthhtohepmhgrohgsihgsoheslhhoohhnghhsohhnrdgt nh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Tue, 20 Aug 2024 19:42:33 +0100 Subject: [PATCH for-9.1] hw/loongarch: Fix length for lowram in ACPI SRAT MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240820-fix-numa-range-v1-1-c5d6b889996f@flygoat.com> X-B4-Tracking: v=1; b=H4sIAJjjxGYC/x2MQQqAMAwEvyI5G0mrh+pXxINoqjlYJUURSv9u8 Tjs7CSIrMIRhiqB8iNRzlDA1BUs+xw2RlkLgyXbkbOEXl4M9zGj/qs3nlqybFq3QjldysX4gyP 4U7FvDEw5fxj+wIVpAAAA To: qemu-devel@nongnu.org Cc: Song Gao , Bibo Mao , Jiaxun Yang X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1479; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=DVSx+QjX9JZ5kGyd1+nSpGiO2tMFbQCOfmypGGgGvzs=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhrQjj2cr+Pred7h58el/XrOk2Mwnp2X2Fp3PPFTBPu/Do WMzG8/3dJSyMIhxMciKKbKECCj1bWi8uOD6g6w/MHNYmUCGMHBxCsBE1vgz/FOa+UTKf47gDs6P 6wKO6xfcFJR1/XzAozHpnfg5Yf5URzZGhhVfz+d3HyhfctDd37T2yEFjBl8hDrcOXaEcZVuHnjN PGAE= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=103.168.172.154; envelope-from=jiaxun.yang@flygoat.com; helo=fhigh3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @flygoat.com) X-ZM-MESSAGEID: 1724179408839116600 The size of lowram should be "gap" instead of the whole node. This is failing kernel's sanity check: [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffff] [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x16fffffff] [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x170000000-0x26fffffff] [ 0.000000] Warning: node 0 [mem 0x00000000-0xffffffff] overlaps with it= self [mem 0x80000000-0x16fffffff] Fixes: fc100011f38d ("hw/loongarch: Refine acpi srat table for numa memory") Signed-off-by: Jiaxun Yang Reviewed-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 72bfc35ae6c2..2638f8743463 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/loongarch/acpi-build.c @@ -218,7 +218,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, Mach= ineState *machine) * highram: [VIRT_HIGHMEM_BASE, +(len - gap)) */ if (len >=3D gap) { - build_srat_memory(table_data, base, len, i, MEM_AFFINITY_ENABL= ED); + build_srat_memory(table_data, base, gap, i, MEM_AFFINITY_ENABL= ED); len -=3D gap; base =3D VIRT_HIGHMEM_BASE; gap =3D machine->ram_size - VIRT_LOWMEM_SIZE; --- base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a change-id: 20240820-fix-numa-range-f1f0302e138d Best regards, --=20 Jiaxun Yang