Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-30 Thread Xiao Guangrong
On 08/28/2015 07:59 PM, Stefan Hajnoczi wrote: On Wed, Aug 26, 2015 at 06:42:01PM +0800, Xiao Guangrong wrote: On 08/26/2015 12:16 AM, Stefan Hajnoczi wrote: On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: +#ifdef NVDIMM_DEBUG +#define nvdebug(fmt, ...) fprintf(stderr, "nvd

Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-28 Thread Stefan Hajnoczi
On Wed, Aug 26, 2015 at 06:42:01PM +0800, Xiao Guangrong wrote: > > > On 08/26/2015 12:16 AM, Stefan Hajnoczi wrote: > >On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: > >>+#ifdef NVDIMM_DEBUG > >>+#define nvdebug(fmt, ...) fprintf(stderr, "nvdimm: " fmt, ## __VA_ARGS__) > >>+#els

Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-26 Thread Xiao Guangrong
On 08/26/2015 12:16 AM, Stefan Hajnoczi wrote: On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: +#ifdef NVDIMM_DEBUG +#define nvdebug(fmt, ...) fprintf(stderr, "nvdimm: " fmt, ## __VA_ARGS__) +#else +#define nvdebug(...) +#endif The following allows the compiler to check forma

Re: [Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-25 Thread Stefan Hajnoczi
On Fri, Aug 14, 2015 at 10:52:06PM +0800, Xiao Guangrong wrote: > +#ifdef NVDIMM_DEBUG > +#define nvdebug(fmt, ...) fprintf(stderr, "nvdimm: " fmt, ## __VA_ARGS__) > +#else > +#define nvdebug(...) > +#endif The following allows the compiler to check format strings and syntax check the argument exp

[Qemu-devel] [PATCH v2 13/18] nvdimm: build namespace config data

2015-08-14 Thread Xiao Guangrong
If @configdata is false, Qemu will build a static and readonly namespace in memory and use it serveing for DSM GET_CONFIG_SIZE/GET_CONFIG_DATA requests Signed-off-by: Xiao Guangrong --- hw/mem/Makefile.objs | 3 +- hw/mem/nvdimm/acpi.c | 10 ++ hw/mem/nvdimm/internal.h | 12 ++