From patchwork Mon Oct 10 00:34:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9368789 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 3B1966048F for ; Mon, 10 Oct 2016 00:35:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DD9E288B0 for ; Mon, 10 Oct 2016 00:35:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20AA0288C5; Mon, 10 Oct 2016 00:35:41 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA631288B0 for ; Mon, 10 Oct 2016 00:35:40 +0000 (UTC) Received: from localhost ([::1]:46594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btOZ9-0005yB-RO for patchwork-qemu-devel@patchwork.kernel.org; Sun, 09 Oct 2016 20:35:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btOYZ-0005u8-5C for qemu-devel@nongnu.org; Sun, 09 Oct 2016 20:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btOYU-00039Z-Ua for qemu-devel@nongnu.org; Sun, 09 Oct 2016 20:35:02 -0400 Received: from mga14.intel.com ([192.55.52.115]:17994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btOYU-00039N-Oh for qemu-devel@nongnu.org; Sun, 09 Oct 2016 20:34:58 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 09 Oct 2016 17:34:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,469,1473145200"; d="scan'208"; a="1062593056" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.148]) by orsmga002.jf.intel.com with ESMTP; 09 Oct 2016 17:34:56 -0700 From: Haozhong Zhang To: qemu-devel@nongnu.org, xen-devel@lists.xensource.com Date: Mon, 10 Oct 2016 08:34:18 +0800 Message-Id: <20161010003423.4333-4-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161010003423.4333-1-haozhong.zhang@intel.com> References: <20161010003423.4333-1-haozhong.zhang@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.115 Subject: [Qemu-devel] [RFC QEMU PATCH 3/8] nvdimm acpi: do not use fw_cfg on Xen 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 , Igor Mammedov , "Michael S. Tsirkin" , Xiao Guangrong , Konrad Rzeszutek Wilk Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP No fw_cfg is created when QEMU is used as the device model of Xen. Signed-off-by: Haozhong Zhang --- Cc: Xiao Guangrong Cc: "Michael S. Tsirkin" Cc: Igor Mammedov --- hw/acpi/nvdimm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index e486128..c9c2a84 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -770,8 +770,11 @@ void nvdimm_init_acpi_state(AcpiNVDIMMState *state, MemoryRegion *io, state->dsm_mem = g_array_new(false, true /* clear */, 1); acpi_data_push(state->dsm_mem, sizeof(NvdimmDsmIn)); - fw_cfg_add_file(fw_cfg, NVDIMM_DSM_MEM_FILE, state->dsm_mem->data, - state->dsm_mem->len); + /* No fw_cfg is used when running on Xen */ + if (fw_cfg) { + fw_cfg_add_file(fw_cfg, NVDIMM_DSM_MEM_FILE, state->dsm_mem->data, + state->dsm_mem->len); + } } #define NVDIMM_COMMON_DSM "NCAL"