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 1184CC433E0 for ; Thu, 28 May 2020 22:44:50 +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 CC04220721 for ; Thu, 28 May 2020 22:44:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC04220721 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]:47746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeRGb-0002jj-1b for qemu-devel@archiver.kernel.org; Thu, 28 May 2020 18:44:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeR75-00044d-D9 for qemu-devel@nongnu.org; Thu, 28 May 2020 18:34:59 -0400 Received: from mga14.intel.com ([192.55.52.115]:41310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeR6z-0007vj-BY for qemu-devel@nongnu.org; Thu, 28 May 2020 18:34:59 -0400 IronPort-SDR: YtzSeLxoQvU9XQPqLX6rNKGsp7kM1qPpLUrUbaps76LZ58uiDiqXxUAvZCZFkmThQW7uaNth6b G230Uu7j9LHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 15:34:49 -0700 IronPort-SDR: eBb8xL9QU/glFNIdEl8w7NISHJf3A/St9TcdeufUaJJrjHfkZbqbxa4EHyHEC5LXQg3LrizVvZ rYqM8rnwi9SQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,446,1583222400"; d="scan'208";a="256314828" Received: from vverma7-mobl4.lm.intel.com ([10.251.139.189]) by orsmga007.jf.intel.com with ESMTP; 28 May 2020 15:34:48 -0700 From: Vishal Verma To: Subject: [PATCH v4 0/3] account for NVDIMM nodes during SRAT generation Date: Thu, 28 May 2020 16:34:34 -0600 Message-Id: <20200528223437.12568-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=192.55.52.115; envelope-from=vishal.l.verma@intel.com; helo=mga14.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/28 18:34:49 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 v3: - Add the SRAT augmentation for ARM's virt-acpi-build as well (Igor) - Update patches 1 and 3 for the test binaries to include ARM tests. Changes since v2: - Change a repetitive OBJECT(dev) to a stored 'Object' (Igor) - No need to return 'numamem' back to build_srat (Igor) 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/nvdimm: add a helper to augment SRAT generation tests/acpi: update expected SRAT files hw/acpi/nvdimm.c | 23 +++++++++++++++++++++++ hw/arm/virt-acpi-build.c | 4 ++++ hw/i386/acpi-build.c | 5 +++++ 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 tests/data/acpi/virt/SRAT.memhp | Bin 186 -> 226 bytes 7 files changed, 33 insertions(+) -- 2.26.2