From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6GS-0003fs-Cr for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:31:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX6GO-0003D2-6p for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:31:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6GO-0003Cr-1X for qemu-devel@nongnu.org; Wed, 02 Sep 2015 07:31:36 -0400 Date: Wed, 2 Sep 2015 13:31:30 +0200 From: Igor Mammedov Message-ID: <20150902133130.720c411a@nial.brq.redhat.com> In-Reply-To: <55E6D13B.5070106@linux.intel.com> References: <1439563931-12352-1-git-send-email-guangrong.xiao@linux.intel.com> <1439563931-12352-7-git-send-email-guangrong.xiao@linux.intel.com> <20150902115845.01472189@nial.brq.redhat.com> <55E6D13B.5070106@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xiao Guangrong Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, rth@twiddle.net On Wed, 2 Sep 2015 18:36:43 +0800 Xiao Guangrong wrote: > > > On 09/02/2015 05:58 PM, Igor Mammedov wrote: > > On Fri, 14 Aug 2015 22:51:59 +0800 > > Xiao Guangrong wrote: > > > >> Introduce "pc-nvdimm" device and it has two parameters: > > Why do you use prefix "pc-", I suppose we potentially > > could use this device not only with x86 targets but with > > other targets as well. > > I'd just drop 'pc' prefix through out patchset. > > Yeah, the prefix is stolen from pc-dimm, will drop this > prefix as your suggestion. > > > > >> - @file, which is the backed memory file for NVDIMM device > > Could you try to split device into backend/frontend parts, > > like it's done with pc-dimm. As I understand it's preferred > > way to implement this kind of devices. > > Then you could reuse memory backends that we already have > > including file backend. > > I considered it too and Stefan, Paolo got the some idea in > V1's review, however: > > | However, file-based memory used by NVDIMM is special, it divides the file > | to two parts, one part is used as PMEM and another part is used to store > | NVDIMM's configure data. > | > | Maybe we can introduce "end-reserved" property to reserve specified size > | 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 magic > | thing? I'd go with separate backend/frontend idea. Question is if this config area is part backend or frontend? If we pass-through NVDIMM device do we need to set configdata=true and QEMU would skip building config structures and use structures that are already present on passed-through device in that place? > > Your idea? [...]