From patchwork Mon Mar 20 00:12:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9632903 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 2883E6020B for ; Mon, 20 Mar 2017 00:16:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D3A027F60 for ; Mon, 20 Mar 2017 00:16:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 123BE27FBC; Mon, 20 Mar 2017 00:16:05 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 9FF2F27F60 for ; Mon, 20 Mar 2017 00:16:04 +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 1cpkwi-0006U1-Vy; Mon, 20 Mar 2017 00:13:12 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpkwh-0006Rd-U3 for xen-devel@lists.xen.org; Mon, 20 Mar 2017 00:13:12 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 07/EE-23940-79E1FC85; Mon, 20 Mar 2017 00:13:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVywNykWHe63Pk Igy0vuC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oz1LWeZCk5wVrT1JjQwnmPvYuTiYBG4xSTx 8kQLE4gjJDCdUeLcyUuMXYycHBICvBJHls1ghbD9JM7OXMAOUdTLKLF95Td2kASbgL7EiscHg Yo4OEQEjCXabjqD1DALNDNJHJzaClYjLOAmsWD1JjCbRUBV4uOnM2A2r4CtxMqna9ggFshLXL h6igVkDqeAnUTHbDeQsBBQyY9Vk1kmMPItYGRYxahRnFpUllqka2ipl1SUmZ5RkpuYmaNraGC sl5taXJyYnpqTmFSsl5yfu4kRGCb1DAyMOxh/H/c7xCjJwaQkyvtP/VyEEF9SfkplRmJxRnxR aU5q8SFGGQ4OJQneWtnzEUKCRanpqRVpmTnAgIVJS3DwKInwygGDVoi3uCAxtzgzHSJ1ilFRS px3BkifAEgiozQPrg0WJZcYZaWEeRkZGBiEeApSi3IzS1DlXzGKczAqCfN2gUzhycwrgZv+Cm gxE9DiZTfOgCwuSURISTUwzmNmstFmWa2+cs/ru1Wubd5bph075SH75e2S+6qSPU/iV0ZdWMW QWD2H+bQa467nP0TnbdQTnszU94PpQmkO7x7xN1IKP26zz2raOjOrImNXzu4LPZ78e0pDk0Te +vc21i90nynG0CBpaMu25GHnqXDVa5buV0/F7VSOv7fchu9CDk9uQ3uoEktxRqKhFnNRcSIA/ 3M4q40CAAA= X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1489968786!90971295!4 X-Originating-IP: [192.55.52.115] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21600 invoked from network); 20 Mar 2017 00:13:10 -0000 Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by server-3.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 Mar 2017 00:13:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489968790; x=1521504790; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=PtVXEjq6aVZfUFaAZObS/bL9Eyk5tt1YIrB8MbfSiv8=; b=Y4caV9cgtLvEsI1fhg/7FT0YCO4raPPzSdE83TiezkhUoXmrbIRX2bWn BhEJPmR1oWLHfGqMQqd27RTRxO/qEw==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2017 17:13:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,191,1486454400"; d="scan'208";a="78799172" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.153]) by fmsmga006.fm.intel.com with ESMTP; 19 Mar 2017 17:13:08 -0700 From: Haozhong Zhang To: qemu-devel@nongnu.org, xen-devel@lists.xen.org Date: Mon, 20 Mar 2017 08:12:44 +0800 Message-Id: <20170320001249.25521-6-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170320001249.25521-1-haozhong.zhang@intel.com> References: <20170320001249.25521-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Xiao Guangrong , "Michael S. Tsirkin" , Igor Mammedov , Konrad Rzeszutek Wilk , Dan Williams Subject: [Xen-devel] [RFC QEMU PATCH v2 05/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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index bb45452e70..2509561729 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -32,6 +32,7 @@ #include "hw/acpi/bios-linker-loader.h" #include "hw/nvram/fw_cfg.h" #include "hw/mem/nvdimm.h" +#include "hw/xen/xen.h" static int nvdimm_device_list(Object *obj, void *opaque) { @@ -402,6 +403,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