From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAixt-0005yY-Iq for qemu-devel@nongnu.org; Thu, 02 Jul 2015 14:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAixp-0004Ew-I9 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 14:12:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAixp-0004Eq-DU for qemu-devel@nongnu.org; Thu, 02 Jul 2015 14:11:57 -0400 References: <1435762232-15543-1-git-send-email-guangrong.xiao@linux.intel.com> <20150702092044.GB20198@stefanha-thinkpad.redhat.com> <559509FA.20509@redhat.com> <55957C7A.9050200@linux.intel.com> From: Paolo Bonzini Message-ID: <55957EE5.6090307@redhat.com> Date: Thu, 2 Jul 2015 20:11:49 +0200 MIME-Version: 1.0 In-Reply-To: <55957C7A.9050200@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 00/16] implement vNVDIMM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xiao Guangrong , Stefan Hajnoczi Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , stefanha@redhat.com, imammedo@redhat.com, rth@twiddle.net On 02/07/2015 20:01, Xiao Guangrong wrote: >=20 > Thanks for your review, Stefan and Paolo! >=20 > On 07/02/2015 05:52 PM, Paolo Bonzini wrote: >> >> >> On 02/07/2015 11:20, Stefan Hajnoczi wrote: >>>> Currently, the NVDIMM driver has been merged into upstream Linux >>>> Kernel and >>>> this patchset tries to enable it in virtualization field >>> >>> From a device model perspective, have you checked whether it makes >>> sense >>> to integrate nvdimms into the pc-dimm and hostmem code that is used f= or >>> memory hotplug and NUMA? >>> >>> The NVDIMM device in your patches is a completely new TYPE_DEVICE so = it >>> doesn't share any interfaces or code with existing memory devices. >>> Maybe that is the right solution here because NVDIMMs have different >>> characteristics, but I'm not sure. >> >> The hostmem code should definitely be shared, e.g. by adding a new >> "file" property to the memory-backend-file class. ivshmem can also us= e >> it---CCing Marc-Andr=EF=BF=BD. >=20 > However, file-based memory used by NVDIMM is special, it divides the fi= le > to two parts, one part is used as PMEM and another part is used to stor= e > NVDIMM's configure data. >=20 > Maybe we can introduce "end-reserved" property to reserve specified siz= e > at the end of the file. Or create a new class type based on > memory-backend-file (named nvdimm-backend-file) class to hide this magi= c > thing? I need to read the code then. :) Paolo