From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: qemu-devel@nongnu.org, xen-devel@lists.xensource.com,
Xiao Guangrong <guangrong.xiao@linux.intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [RFC QEMU PATCH 1/8] nvdimm: do not initialize label_data if label_size is zero
Date: Wed, 15 Feb 2017 17:18:10 -0500 [thread overview]
Message-ID: <20170215221810.GA25208@char.us.ORACLE.com> (raw)
In-Reply-To: <20161010003423.4333-2-haozhong.zhang@intel.com>
On Mon, Oct 10, 2016 at 08:34:16AM +0800, Haozhong Zhang wrote:
> When memory-backend-xen is used, the label_data pointer can not be got
> via memory_region_get_ram_ptr(). We will use other functions to get
Could you explain why it cannot be retrieved via that way?
> label_data once we introduce NVDIMM label support to Xen.
Is this an particular patch in this series that does that?
You may want to enumerate which one it is.
>
> Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
> ---
> Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/mem/nvdimm.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
> index 7895805..d25993b 100644
> --- a/hw/mem/nvdimm.c
> +++ b/hw/mem/nvdimm.c
> @@ -87,7 +87,9 @@ static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp)
> align = memory_region_get_alignment(mr);
>
> pmem_size = size - nvdimm->label_size;
> - nvdimm->label_data = memory_region_get_ram_ptr(mr) + pmem_size;
> + if (nvdimm->label_size) {
> + nvdimm->label_data = memory_region_get_ram_ptr(mr) + pmem_size;
> + }
> pmem_size = QEMU_ALIGN_DOWN(pmem_size, align);
>
> if (size <= nvdimm->label_size || !pmem_size) {
> --
> 2.10.1
>
next prev parent reply other threads:[~2017-02-15 22:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 0:34 [Qemu-devel] [RFC QEMU PATCH 0/8] Implement vNVDIMM for Xen HVM guest Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 1/8] nvdimm: do not initialize label_data if label_size is zero Haozhong Zhang
2017-02-15 22:18 ` Konrad Rzeszutek Wilk [this message]
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 2/8] xen-hvm: add a function to copy ACPI to guest Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 3/8] nvdimm acpi: do not use fw_cfg on Xen Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 4/8] nvdimm acpi: build and copy NFIT to guest " Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 5/8] nvdimm acpi: build and copy NVDIMM namespace devices " Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 6/8] hostmem: add a host memory backend for Xen Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 7/8] xen-hvm: create hotplug memory region for HVM guest Haozhong Zhang
2016-10-10 0:34 ` [Qemu-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices Haozhong Zhang
2016-10-10 19:16 ` Eric Blake
2016-10-11 6:31 ` Haozhong Zhang
2016-10-11 8:22 ` Markus Armbruster
2016-10-11 10:12 ` Haozhong Zhang
2016-10-11 14:45 ` Eric Blake
2016-10-10 16:52 ` [Qemu-devel] [RFC QEMU PATCH 0/8] Implement vNVDIMM for Xen HVM guest no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170215221810.GA25208@char.us.ORACLE.com \
--to=konrad.wilk@oracle.com \
--cc=guangrong.xiao@linux.intel.com \
--cc=haozhong.zhang@intel.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).