From patchwork Mon Sep 11 04:41:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9946655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 76BFB6035D for ; Mon, 11 Sep 2017 04:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CFFE28ABB for ; Mon, 11 Sep 2017 04:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61F5A28AD7; Mon, 11 Sep 2017 04:44:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 207E728ABB for ; Mon, 11 Sep 2017 04:44:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drGYL-0006S5-4M; Mon, 11 Sep 2017 04:42:33 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drGYK-0006QO-Hu for xen-devel@lists.xen.org; Mon, 11 Sep 2017 04:42:32 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id EF/B9-02226-73416B95; Mon, 11 Sep 2017 04:42:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRWlGSWpSXmKPExsXS1tYhr2susi3 S4LSlxZKPi1kcGD2O7v7NFMAYxZqZl5RfkcCa0XT5G2vBZM6KbVtWsTUw7mbvYuTkEBKolFg6 qYsVxJYQ4JU4smwGkM0BZAdIvLil2MXIBVTSyyhx5dA+sBo2AX2JFY8PgtWICBhLtN10BqlhF tjAJPFh73KwGmEBf4nFHz+ygNgsAqoSpzdOB9vFK2AnMelVLxvELnmJXW0Xweo5geJ9Le+ZIe 6xlVi78gHLBEbeBYwMqxg1ilOLylKLdI3M9JKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpOK9ZL zczcxAkOhnoGBcQdjw16/Q4ySHExKorzvjm+JFOJLyk+pzEgszogvKs1JLT7EKMPBoSTBe1do W6SQYFFqempFWmYOMChh0hIcPEoivFEgad7igsTc4sx0iNQpRmOOY5su/2Hi6Lh59w+TEEtef l6qlDjvdJBSAZDSjNI8uEGwaLnEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZj3IsgUnsy8Er h9r4BOYQI6hefSFpBTShIRUlINjFITjvj2ec5MuHXytg2HqZPZHVf3/XN2XzpsqJgxL8HJ2lf Bd1as/cK4pZILjt82CP16T79V6FHq3A1J7k+6J15P9ung7Aq+ynjdPH9Xw7Hnj3ytt359b+sv 4bdHzXrl8clf9c4v9BJ55Lv7U+OSt/pGx/+sedfofFzvt1jSmrx/zQuWHd3Em6PEUpyRaKjFX FScCAB2AXeFkQIAAA== X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1505104925!114186094!10 X-Originating-IP: [134.134.136.31] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33919 invoked from network); 11 Sep 2017 04:42:30 -0000 Received: from mga06.intel.com (HELO mga06.intel.com) (134.134.136.31) by server-8.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 11 Sep 2017 04:42:30 -0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 10 Sep 2017 21:42:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,376,1500966000"; d="scan'208"; a="1217079171" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.142]) by fmsmga002.fm.intel.com with ESMTP; 10 Sep 2017 21:42:28 -0700 From: Haozhong Zhang To: qemu-devel@nongnu.org, xen-devel@lists.xen.org Date: Mon, 11 Sep 2017 12:41:56 +0800 Message-Id: <20170911044157.15403-10-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170911044157.15403-1-haozhong.zhang@intel.com> References: <20170911044157.15403-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Xiao Guangrong , "Michael S. Tsirkin" , Igor Mammedov , Chao Peng , Dan Williams Subject: [Xen-devel] [RFC QEMU PATCH v3 09/10] nvdimm acpi: do not build _FIT method on Xen X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Xen currently does not support vNVDIMM hotplug and always sets QEMU option "maxmem" to be just enough for RAM and vNVDIMM, so it's not necessary to build _FIT method when QEMU is used as Xen device model. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Xiao Guangrong --- hw/acpi/nvdimm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index bf887512ad..61789c3966 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -1245,7 +1245,14 @@ static void nvdimm_build_ssdt_device(Aml *dev, uint32_t ram_slots) /* 0 is reserved for root device. */ nvdimm_build_device_dsm(dev, 0); - nvdimm_build_fit(dev); + /* + * Xen does not support vNVDIMM hotplug, and always sets the QEMU + * option "maxmem" to be just enough for RAM and static plugged + * vNVDIMM, so it's unnecessary to build _FIT method on Xen. + */ + if (!xen_enabled()) { + nvdimm_build_fit(dev); + } nvdimm_build_nvdimm_devices(dev, ram_slots); }