From nobody Thu Nov 6 10:24:01 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; 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; dmarc=fail(p=none dis=none) header.from=linux.intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540234639360468.93725719721783; Mon, 22 Oct 2018 11:57:19 -0700 (PDT) Received: from localhost ([::1]:36701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEfOA-0000Fy-58 for importer@patchew.org; Mon, 22 Oct 2018 14:57:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEf6y-0001V9-DH for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEf6w-0005Za-Cl for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:32 -0400 Received: from mga01.intel.com ([192.55.52.88]:7889) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEf6t-0004iw-BW for qemu-devel@nongnu.org; Mon, 22 Oct 2018 14:39:28 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 11:38:59 -0700 Received: from omccarth-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.18.99]) by FMSMGA003.fm.intel.com with ESMTP; 22 Oct 2018 11:38:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,413,1534834800"; d="scan'208";a="90378093" From: Samuel Ortiz To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2018 20:36:54 +0200 Message-Id: <20181022183656.4902-25-sameo@linux.intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181022183656.4902-1-sameo@linux.intel.com> References: <20181022183656.4902-1-sameo@linux.intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.88 Subject: [Qemu-devel] [PATCH 24/26] hw: acpi: reduced: Add SRAT table 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: Yang Zhong , Igor Mammedov , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Yang Zhong If the platform is a NUMA enabled, we add the SRAT table to the ACPI build. It is up to the calling platform to define its own SRAT build method or use the aml-build.c one. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Signed-off-by: Yang Zhong --- hw/acpi/reduced.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/acpi/reduced.c b/hw/acpi/reduced.c index 3754258335..9d0c5ba01e 100644 --- a/hw/acpi/reduced.c +++ b/hw/acpi/reduced.c @@ -188,6 +188,16 @@ static void acpi_reduced_build(MachineState *ms, AcpiB= uildTables *tables, acpi_add_table(table_offsets, tables_blob); mc->firmware_build_methods.acpi.madt(tables_blob, tables->linker, ms, = conf); =20 + if (conf->numa_nodes) { + acpi_add_table(table_offsets, tables_blob); + mc->firmware_build_methods.acpi.srat(tables_blob, tables->linker, + ms, conf); + if (have_numa_distance) { + acpi_add_table(table_offsets, tables_blob); + mc->firmware_build_methods.acpi.slit(tables_blob, tables->link= er); + } + } + if (acpi_get_mcfg(&mcfg)) { acpi_add_table(table_offsets, tables_blob); mc->firmware_build_methods.acpi.mcfg(tables_blob, --=20 2.17.2