Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbcJJAfh (ORCPT ); Sun, 9 Oct 2016 20:35:37 -0400 Received: from mga04.intel.com ([192.55.52.120]:7062 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbcJJAfg (ORCPT ); Sun, 9 Oct 2016 20:35:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,469,1473145200"; d="scan'208";a="1042480723" From: Haozhong Zhang To: linux-nvdimm@ml01.01.org, xen-devel@lists.xenproject.org Cc: Xiao Guangrong , Konrad Rzeszutek Wilk , Haozhong Zhang , Dan Williams , Ross Zwisler , Boris Ostrovsky , David Vrabel , Juergen Gross , Andrew Morton , Johannes Thumshirn , Arnd Bergmann , Stefano Stabellini , linux-kernel@vger.kernel.org Subject: [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen Date: Mon, 10 Oct 2016 08:35:21 +0800 Message-Id: <20161010003523.4423-1-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2322 Lines: 58 Overview ======== This RFC kernel patch series along with corresponding patch series of Xen, QEMU and ndctl implements Xen vNVDIMM, which can map the host NVDIMM devices to Xen HVM domU as vNVDIMM devices. Xen hypervisor does not include an NVDIMM driver, so it needs the assistance from the driver in Dom0 Linux kernel to manage NVDIMM devices. We currently only supports NVDIMM devices in pmem mode. Design and Implementation ========================= The complete design can be found at https://lists.xenproject.org/archives/html/xen-devel/2016-07/msg01921.html. All patch series can be found at Xen: https://github.com/hzzhan9/xen.git nvdimm-rfc-v1 QEMU: https://github.com/hzzhan9/qemu.git xen-nvdimm-rfc-v1 Linux kernel: https://github.com/hzzhan9/nvdimm.git xen-nvdimm-rfc-v1 ndctl: https://github.com/hzzhan9/ndctl.git pfn-xen-rfc-v1 Xen hypervisor needs assistance from Dom0 Linux kernel for following tasks: 1) Reserve an area on NVDIMM devices for Xen hypervisor to place memory management data structures, i.e. frame table and M2P table. 2) Report SPA ranges of NVDIMM devices and the reserved area to Xen hypervisor. For 1), Patch 1 implements a new mode PFN_MODE_XEN to pfn devices, which make the reservation for Xen hypervisor. For 2), Patch 2 uses a new Xen hypercall to report the address information of pfn devices in PFN_MODE_XEN. How to test =========== Please refer to the cover letter of Xen patch series "[RFC XEN PATCH 00/16] Add vNVDIMM support to HVM domains". Haozhong Zhang (2): nvdimm: add PFN_MODE_XEN to pfn device for Xen usage xen, nvdimm: report pfn devices in PFN_MODE_XEN to Xen hypervisor drivers/nvdimm/namespace_devs.c | 2 ++ drivers/nvdimm/nd.h | 7 +++++ drivers/nvdimm/pfn_devs.c | 37 +++++++++++++++++++++--- drivers/nvdimm/pmem.c | 61 ++++++++++++++++++++++++++++++++++++++-- drivers/xen/Makefile | 2 +- drivers/xen/pmem.c | 53 ++++++++++++++++++++++++++++++++++ include/linux/pfn_t.h | 2 ++ include/xen/interface/platform.h | 13 +++++++++ include/xen/pmem.h | 32 +++++++++++++++++++++ 9 files changed, 201 insertions(+), 8 deletions(-) create mode 100644 drivers/xen/pmem.c create mode 100644 include/xen/pmem.h -- 2.10.1