From nobody Mon Feb 9 23:03:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489968979569272.91211188969146; Sun, 19 Mar 2017 17:16:19 -0700 (PDT) Received: from localhost ([::1]:58648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpkzi-00071R-C4 for importer@patchew.org; Sun, 19 Mar 2017 20:16:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpkwh-00054W-9N for qemu-devel@nongnu.org; Sun, 19 Mar 2017 20:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpkwg-0004ve-Dw for qemu-devel@nongnu.org; Sun, 19 Mar 2017 20:13:11 -0400 Received: from mga03.intel.com ([134.134.136.65]:51743) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cpkwg-0004uJ-4J for qemu-devel@nongnu.org; Sun, 19 Mar 2017 20:13:10 -0400 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2017 17:13:09 -0700 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 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==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,191,1486454400"; d="scan'208";a="78799172" 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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.65 Subject: [Qemu-devel] [RFC QEMU PATCH v2 05/10] nvdimm acpi: copy NFIT to Xen guest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haozhong Zhang , Xiao Guangrong , "Michael S. Tsirkin" , Igor Mammedov , Konrad Rzeszutek Wilk , Dan Williams Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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" =20 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, NU= LL); + + if (xen_enabled()) { + xen_acpi_copy_to_guest("NFIT", table_data->data + header, + sizeof(NvdimmNfitHeader) + fit_buf->fit->le= n, + XEN_DM_ACPI_BLOB_TYPE_TABLE); + } } =20 #define NVDIMM_DSM_MEMORY_SIZE 4096 --=20 2.12.0