From patchwork Mon Sep 11 04:41:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9946643 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 664616035D for ; Mon, 11 Sep 2017 04:43:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B2C628ABE for ; Mon, 11 Sep 2017 04:43:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EB2128ABB; Mon, 11 Sep 2017 04:43:54 +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 0C46C28ABB for ; Mon, 11 Sep 2017 04:43:54 +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 1drGYG-0006Kv-LG; Mon, 11 Sep 2017 04:42:28 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drGYF-0006IK-2F for xen-devel@lists.xen.org; Mon, 11 Sep 2017 04:42:27 +0000 Received: from [85.158.137.68] by server-14.bemta-3.messagelabs.com id 2E/50-01910-23416B95; Mon, 11 Sep 2017 04:42:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsXS1tYhr2sosi3 S4OhGA4slHxezODB6HN39mymAMYo1My8pvyKBNePYwzbGgh/sFZ3tf9kaGGewdTFycggJVErM 29/MAmJLCPBKHFk2gxXCDpA4vrCFuYuRC6iml1Hi/OO3jCAJNgF9iRWPDwIVcXCICBhLtN10B qlhFtjAJPFh73KwZmEBN4m/XxvBbBYBVYmb196CLeAVsJXYcWcXE8QCeYldbRfBajgF7CT6Wt 4zQxxkK7F25QOWCYy8CxgZVjFqFKcWlaUW6RqZ6SUVZaZnlOQmZuboGhoY6+WmFhcnpqfmJCY V6yXn525iBIZDPQMD4w7Ghr1+hxglOZiURHnfHd8SKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mC 967QtkghwaLU9NSKtMwcYGDCpCU4eJREeKNA0rzFBYm5xZnpEKlTjLocHTfv/mESYsnLz0uVE uedDlIkAFKUUZoHNwIWJZcYZaWEeRkZGBiEeApSi3IzS1DlXzGKczAqCfNeBJnCk5lXArfpFd ARTEBH8FzaAnJESSJCSqqBUW0iv5Nn+f6G8HJHl1bbVfX+PM2updsN336WT7pmufZ5YFHD+1u zFtoJcfrf6Zkz5cfDtWrdv4K+ha2etmKiVaq97clP27d0NgRflwrb1FjMzz7V8Mci5r4ZUsuN E3zXylYE2cXdlv4iEX/QN9fqmcGZBc/s3ll+OdOxeVp7rNpKzV3fLi6MVGIpzkg01GIuKk4EA Mav1zaNAgAA X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1505104925!114186094!8 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 33672 invoked from network); 11 Sep 2017 04:42:25 -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:25 -0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 10 Sep 2017 21:42:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,376,1500966000"; d="scan'208"; a="1217079153" 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:23 -0700 From: Haozhong Zhang To: qemu-devel@nongnu.org, xen-devel@lists.xen.org Date: Mon, 11 Sep 2017 12:41:54 +0800 Message-Id: <20170911044157.15403-8-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 07/10] nvdimm acpi: copy NFIT to Xen guest 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 relies on QEMU to build the guest NFIT. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Xiao Guangrong --- hw/acpi/nvdimm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9121a766c6..d9cdc5a531 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -404,6 +404,12 @@ static void nvdimm_build_nfit(AcpiNVDIMMState *state, GArray *table_offsets, build_header(linker, table_data, (void *)(table_data->data + header), "NFIT", sizeof(NvdimmNfitHeader) + fit_buf->fit->len, 1, NULL, NULL); + + if (xen_enabled()) { + xen_acpi_copy_to_guest("NFIT", table_data->data + header, + sizeof(NvdimmNfitHeader) + fit_buf->fit->len, + XEN_DM_ACPI_BLOB_TYPE_TABLE); + } } #define NVDIMM_DSM_MEMORY_SIZE 4096