[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Lab
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function |
Date: |
Thu, 29 Oct 2015 14:14:22 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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.
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v5 16/33] pc-dimm: rename pc-dimm.c and pc-dimm.h, (continued)
- [Qemu-devel] [PATCH v5 16/33] pc-dimm: rename pc-dimm.c and pc-dimm.h, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 19/33] dimm: keep the state of the whole backend memory, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 22/33] docs: add NVDIMM ACPI documentation, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 20/33] dimm: introduce realize callback, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 21/33] nvdimm: implement NVDIMM device abstract, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 23/33] nvdimm acpi: init the resource used by NVDIMM ACPI, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 26/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 25/33] nvdimm acpi: build ACPI nvdimm devices, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 24/33] nvdimm acpi: build ACPI NFIT table, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 27/33] nvdimm acpi: support function 0, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 31/33] nvdimm: allow using whole backend memory as pmem, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 30/33] nvdimm acpi: support Set Namespace Label Data function, Xiao Guangrong, 2015/10/28
- [Qemu-devel] [PATCH v5 29/33] nvdimm acpi: support Get Namespace Label Data function, Xiao Guangrong, 2015/10/28