Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbcJJGcV (ORCPT ); Mon, 10 Oct 2016 02:32:21 -0400 Received: from mga01.intel.com ([192.55.52.88]:1327 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbcJJGcU (ORCPT ); Mon, 10 Oct 2016 02:32:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,471,1473145200"; d="scan'208";a="17984562" Date: Mon, 10 Oct 2016 14:32:15 +0800 From: Haozhong Zhang To: Dan Williams Cc: "linux-nvdimm@lists.01.org" , , Xiao Guangrong , Konrad Rzeszutek Wilk , Ross Zwisler , Boris Ostrovsky , David Vrabel , Juergen Gross , Andrew Morton , Johannes Thumshirn , "Arnd Bergmann" , Stefano Stabellini , "linux-kernel@vger.kernel.org" Subject: Re: [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen Message-ID: <20161010063215.24jukvont5ctansy@hz-desktop> Mail-Followup-To: Dan Williams , "linux-nvdimm@lists.01.org" , , Xiao Guangrong , Konrad Rzeszutek Wilk , Ross Zwisler , Boris Ostrovsky , David Vrabel , Juergen Gross , Andrew Morton , Johannes Thumshirn , "Arnd Bergmann" , Stefano Stabellini , "linux-kernel@vger.kernel.org" References: <20161010003523.4423-1-haozhong.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20160827 (1.7.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 37 On 10/09/16 20:45, Dan Williams wrote: > On Sun, Oct 9, 2016 at 5:35 PM, Haozhong Zhang wrote: > > 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. > > The KVM enabling for persistent memory does not need this support from > the kernel, and as far as I can see neither does Xen. If the > hypervisor needs to reserve some space it can simply trim the amount > that it hands to the guest. > Xen does not have the NVDIMM driver, so it cannot operate on NVDIMM devices by itself. Instead it relies on the driver in Dom0 Linux to probe NVDIMM and make the reservation. > The usage of fiemap and the sysfs resource for the pmem device, as > mentioned in the design document, does not seem to comprehend that > file block allocations may be discontiguous and may change over time > depending on the file. True. I may need to find a way to notify Xen of the underlying changes, so that Xen can then adjust the address mapping. Thanks, Haozhong