On Thu, Oct 29, 2015 at 10:16:14AM +0800, Xiao Guangrong wrote: > > > On 10/29/2015 12:41 AM, Stefan Hajnoczi wrote: > >On Wed, Oct 28, 2015 at 10:26:26PM +0000, Xiao Guangrong wrote: > >>+struct nvdimm_func_in_get_label_data { > >>+ uint32_t offset; /* the offset in the namespace label data area. */ > >>+ uint32_t length; /* the size of data is to be read via the function. */ > >>+} QEMU_PACKED; > >>+typedef struct nvdimm_func_in_get_label_data nvdimm_func_in_get_label_data; > > > >./CODING_STYLE "3. Naming": > > > > Structured type names are in CamelCase; harder to type but standing > > out. > > Did not realize it before. Will change its name to: > NVDIMMFuncInGetLabelData Great, thanks! > >>+/* > >>+ * the max transfer size is the max size transferred by both a > >>+ * 'Get Namespace Label Data' function and a 'Set Namespace Label Data' > >>+ * function. > >>+ */ > >>+static uint32_t nvdimm_get_max_xfer_label_size(void) > >>+{ > >>+ nvdimm_dsm_in *in; > >>+ uint32_t max_get_size, max_set_size, dsm_memory_size = getpagesize(); > > > >Why is the host's page size relevant here? Did you mean > >TARGET_PAGE_SIZE? > > Yes. > > NVDIMM is the common code, unfortunately TARGET_PAGE_SIZE is platform > specified and QEMU lacks a place to include this kind of specified definition: Can you make NVDIMM a per-target object file? Although we try to avoid it whenever possible, it means that qemu-system-x86_64, qemu-system-arm, etc will build x86_64-softmmu/hw/.../nvdimm.o, arm-softmmu/hw/.../nvdimm.o, etc. In Makefile.objs put the nvdimm object file in obj-y instead of common-obj-y.
Attachment:
signature.asc
Description: PGP signature