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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 1FC41C433DF for ; Thu, 28 May 2020 05:49:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E88C92089D for ; Thu, 28 May 2020 05:49:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E88C92089D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeBPw-0001R5-2w for qemu-devel@archiver.kernel.org; Thu, 28 May 2020 01:49:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeBP9-0008HK-PH for qemu-devel@nongnu.org; Thu, 28 May 2020 01:48:35 -0400 Received: from mga02.intel.com ([134.134.136.20]:8378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeBP7-0001Lm-JZ for qemu-devel@nongnu.org; Thu, 28 May 2020 01:48:35 -0400 IronPort-SDR: 3aKeMROrJxEVn/raDtz+migfbSD702yuWPbQdkuzpEy46Ij1E5z/GtaFKB6+hfcbI9MWOzdebP X+gDYMM6zc9g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2020 22:48:29 -0700 IronPort-SDR: ydg+85n3sQn2niKs8BOwjhkeCBLIW3ANXvwkxQO4LdnbUjgR0lHKr1UbvhtLkmN4r/o+Mpn4SQ FCaWDtJXsNIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,443,1583222400"; d="scan'208";a="255696212" Received: from vverma7-mobl4.lm.intel.com ([10.251.137.143]) by fmsmga007.fm.intel.com with ESMTP; 27 May 2020 22:48:28 -0700 From: Vishal Verma To: Subject: [PATCH v2 0/3] account for NVDIMM nodes during SRAT generation Date: Wed, 27 May 2020 23:48:04 -0600 Message-Id: <20200528054807.21278-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=134.134.136.20; envelope-from=vishal.l.verma@intel.com; helo=mga02.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/28 01:48:29 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Xiao Guangrong , "Michael S. Tsirkin" , jingqi.liu@intel.com, Dave Hansen , Eduardo Habkost , Vishal Verma , Paolo Bonzini , Igor Mammedov , Dan Williams , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Changes since v1: - Use error_abort for getters (Igor) - Free the device list (Igor) - Refactor the NVDIMM related portion into hw/acpi/nvdimm.c (Igor) - Rebase onto latest master - Add Jingqi's Reviewed-by On the command line, one can specify a NUMA node for NVDIMM devices. If we set up the topology to give NVDIMMs their own nodes, i.e. not containing any CPUs or regular memory, qemu doesn't populate SRAT memory affinity structures for these nodes. However the NFIT does reference those proximity domains. As a result, Linux, while parsing the SRAT, fails to initialize node related structures for these nodes, and they never end up in the nodes_possible map. When these are onlined at a later point (via hotplug), this causes problems. I've followed the instructions in bios-tables-test.c to update the expected SRAT binary, and the tests (make check) pass. Patches 1 and 3 are the relevant ones for the binary update. Patch 2 is the main patch which changes SRAT generation. Vishal Verma (3): diffs-allowed: add the SRAT AML to diffs-allowed hw/acpi-build: account for NVDIMM numa nodes in SRAT tests/acpi: update expected SRAT files hw/acpi/nvdimm.c | 26 ++++++++++++++++++++++++++ hw/i386/acpi-build.c | 10 ++++++++++ include/hw/mem/nvdimm.h | 1 + tests/data/acpi/pc/SRAT.dimmpxm | Bin 392 -> 392 bytes tests/data/acpi/q35/SRAT.dimmpxm | Bin 392 -> 392 bytes 5 files changed, 37 insertions(+) -- 2.26.2