From: Haozhong Zhang <haozhong.zhang@intel.com>
To: qemu-devel@nongnu.org, xen-devel@lists.xen.org
Cc: Haozhong Zhang <haozhong.zhang@intel.com>,
Xiao Guangrong <guangrong.xiao@linux.intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Konrad Rzeszutek Wilk <konrad@darnok.org>,
Dan Williams <dan.j.williams@intel.com>
Subject: [RFC QEMU PATCH v2 01/10] nvdimm xen: disable label support on Xen
Date: Mon, 20 Mar 2017 08:12:40 +0800 [thread overview]
Message-ID: <20170320001249.25521-2-haozhong.zhang@intel.com> (raw)
In-Reply-To: <20170320001249.25521-1-haozhong.zhang@intel.com>
If xen_enabled(), memory_region_get_ram_ptr() always returns NULL and
nvdimm_realize() cannot get the correct pointer to the label area. This
commit disables the label support for Xen accelerator to workaround
this issue.
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
---
hw/mem/nvdimm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index db896b0bb6..0d3e17e94c 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -87,7 +87,11 @@ 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;
+ /*
+ * TODO: explain the reason
+ */
+ 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.12.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-20 0:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 0:12 [RFC QEMU PATCH v2 00/10] Implement vNVDIMM for Xen HVM guest Haozhong Zhang
2017-03-20 0:12 ` Haozhong Zhang [this message]
2017-04-01 12:25 ` [RFC QEMU PATCH v2 01/10] nvdimm xen: disable label support on Xen Konrad Rzeszutek Wilk
2017-03-20 0:12 ` [RFC QEMU PATCH v2 02/10] xen-hvm: initialize DM ACPI Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 03/10] xen-hvm: support copying ACPI to guest memory Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 04/10] nvdimm acpi: do not use fw_cfg on Xen Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 05/10] nvdimm acpi: copy NFIT to Xen guest Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 06/10] nvdimm acpi: build and copy NVDIMM namespace devices to guest on Xen Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 07/10] xen-hvm: initiate building DM ACPI on i386 machine Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 08/10] hostmem: add a host memory backend for Xen Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 09/10] xen-hvm: create hotplug memory region on Xen Haozhong Zhang
2017-03-20 0:12 ` [RFC QEMU PATCH v2 10/10] qapi: extend 'query-memory-devices' to list devices of specified type Haozhong Zhang
2017-04-11 8:56 ` [Qemu-devel] " Markus Armbruster
2017-03-20 0:26 ` [Qemu-devel] [RFC QEMU PATCH v2 00/10] Implement vNVDIMM for Xen HVM guest no-reply
2017-03-28 13:18 ` 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=20170320001249.25521-2-haozhong.zhang@intel.com \
--to=haozhong.zhang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=guangrong.xiao@linux.intel.com \
--cc=imammedo@redhat.com \
--cc=konrad@darnok.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xen.org \
/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).