Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-10 Thread Igor Mammedov
On Tue, 8 Sep 2015 22:03:01 +0800 Xiao Guangrong wrote: > > > On 09/07/2015 09:40 PM, Igor Mammedov wrote: > > On Sun, 6 Sep 2015 14:07:21 +0800 > > Xiao Guangrong wrote: > > > >> > >> > >> On 09/02/2015 07:31 PM, Igor Mammedov

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-08 Thread Xiao Guangrong
On 09/07/2015 09:40 PM, Igor Mammedov wrote: On Sun, 6 Sep 2015 14:07:21 +0800 Xiao Guangrong wrote: On 09/02/2015 07:31 PM, Igor Mammedov wrote: On Wed, 2 Sep 2015 18:36:43 +0800 Xiao Guangrong wrote: On 09/02/2015

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-07 Thread Igor Mammedov
On Sun, 6 Sep 2015 14:07:21 +0800 Xiao Guangrong wrote: > > > On 09/02/2015 07:31 PM, Igor Mammedov wrote: > > On Wed, 2 Sep 2015 18:36:43 +0800 > > Xiao Guangrong wrote: > > > >> > >> > >> On 09/02/2015 05:58 PM, Igor Mammedov

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-06 Thread Xiao Guangrong
On 09/02/2015 07:31 PM, Igor Mammedov wrote: 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

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-02 Thread Igor Mammedov
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

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-02 Thread Igor Mammedov
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

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-09-02 Thread Xiao Guangrong
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

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-08-26 Thread Xiao Guangrong
On 08/25/2015 10:57 PM, Stefan Hajnoczi wrote: On Fri, Aug 14, 2015 at 10:51:59PM +0800, Xiao Guangrong wrote: +static void set_file(Object *obj, const char *str, Error **errp) +{ +PCNVDIMMDevice *nvdimm = PC_NVDIMM(obj); + +if (nvdimm-file) { +g_free(nvdimm-file); +}

Re: [Qemu-devel] [PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:51:59PM +0800, Xiao Guangrong wrote: +static void set_file(Object *obj, const char *str, Error **errp) +{ +PCNVDIMMDevice *nvdimm = PC_NVDIMM(obj); + +if (nvdimm-file) { +g_free(nvdimm-file); +} g_free(NULL) is a nop so it's safe to replace

[PATCH v2 06/18] pc: implement NVDIMM device abstract

2015-08-14 Thread Xiao Guangrong
Introduce pc-nvdimm device and it has two parameters: - @file, which is the backed memory file for NVDIMM device - @configdata, specify if we need to reserve 128k at the end of @file for nvdimm device's config data. Default is false If @configdata is false, Qemu will build a static and