xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: qemu-devel@nongnu.org, xen-devel@lists.xensource.com
Cc: Haozhong Zhang <haozhong.zhang@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [RFC QEMU PATCH 0/8] Implement vNVDIMM for Xen HVM guest
Date: Mon, 10 Oct 2016 08:34:15 +0800	[thread overview]
Message-ID: <20161010003423.4333-1-haozhong.zhang@intel.com> (raw)

Overview
========
This RFC QEMU patch series along with corresponding patch series of
Xen, Linux kernel and ndctl implements vNVDIMM for Xen HVM guests. DSM
(and hence labels) and hotplug are not supported by this patch series
and will be implemented later.

Design and Implementation
=========================
The complete design can be found at
  https://lists.xenproject.org/archives/html/xen-devel/2016-07/msg01921.html.

All patch series can be found at
  Xen:          https://github.com/hzzhan9/xen.git nvdimm-rfc-v1
  QEMU:         https://github.com/hzzhan9/qemu.git xen-nvdimm-rfc-v1
  Linux kernel: https://github.com/hzzhan9/nvdimm.git xen-nvdimm-rfc-v1
  ndctl:        https://github.com/hzzhan9/ndctl.git pfn-xen-rfc-v1

QEMU, as the device model of Xen HVM domU, is responsible to
1) build NVDIMM ACPI tables and namsepace devices, and
2) find proper areas in the guest physical address space to place
   vNVDIMM devices. The backend resources of vNVDIMM are managed by
   Xen rather than QEMU.

Patch 02 - 05 implement above 1). They implement a mechanism to pass
guest ACPI tables and namespace devices to Xen guests.

Patch 06 - 08 implement above 2). Because the backend resources of
vNVDIMM devices for Xen guest is managed out of QEMU, we introduce a
new host memory backend memory-backend-xen to be used with vNVDIMM
devices. It basically plays as a placeholder, which can fit in the
current pc-dimm code and only gets the guest address ranges of vNVDIMM
devices. The guest address ranges as well as other information of
vNVDIMM devices are passed to Xen via a new QMP command.

Because labels are not supported for Xen guest now, Patch 01 is needed
to avoid dereferencing the NULL pointer to non-existing label data.

How to test
===========
Please refer to the cover letter of Xen patch series
"[RFC XEN PATCH 00/16] Add vNVDIMM support to HVM domains".

Haozhong Zhang (8):
  01/ nvdimm: do not initialize label_data if label_size is zero
  02/ xen-hvm: add a function to copy ACPI to guest
  03/ nvdimm acpi: do not use fw_cfg on Xen
  04/ nvdimm acpi: build and copy NFIT to guest on Xen
  05/ nvdimm acpi: build and copy NVDIMM namespace devices to guest on Xen
  06/ hostmem: add a host memory backend for Xen
  07/ xen-hvm: create hotplug memory region for HVM guest
  08/ qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

 backends/Makefile.objs      |   1 +
 backends/hostmem-xen.c      | 120 ++++++++++++++++++++++
 backends/hostmem.c          |   9 ++
 docs/qmp-commands.txt       |  36 +++++++
 hw/acpi/aml-build.c         |  11 ++-
 hw/acpi/nvdimm.c            |  75 +++++++++-----
 hw/i386/pc.c                |  12 ++-
 hw/mem/nvdimm.c             |  39 +++++++-
 hw/mem/pc-dimm.c            |   5 +-
 include/hw/acpi/aml-build.h |   2 +
 include/hw/mem/nvdimm.h     |  10 ++
 include/hw/xen/xen.h        |   8 ++
 qapi-schema.json            |  29 ++++++
 xen-hvm.c                   | 235 ++++++++++++++++++++++++++++++++++++++++++++
 14 files changed, 556 insertions(+), 36 deletions(-)
 create mode 100644 backends/hostmem-xen.c

-- 
2.10.1

             reply	other threads:[~2016-10-10  0:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10  0:34 Haozhong Zhang [this message]
2016-10-10  0:34 ` [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
2016-10-10  0:34 ` [RFC QEMU PATCH 2/8] xen-hvm: add a function to copy ACPI to guest Haozhong Zhang
2016-10-10  0:34 ` [RFC QEMU PATCH 3/8] nvdimm acpi: do not use fw_cfg on Xen Haozhong Zhang
2016-10-10  0:34 ` [RFC QEMU PATCH 4/8] nvdimm acpi: build and copy NFIT to guest " Haozhong Zhang
2016-10-10  0:34 ` [RFC QEMU PATCH 5/8] nvdimm acpi: build and copy NVDIMM namespace devices " Haozhong Zhang
2016-10-10  0:34 ` [RFC QEMU PATCH 6/8] hostmem: add a host memory backend for Xen Haozhong Zhang
2016-10-10  0:34 ` [RFC QEMU PATCH 7/8] xen-hvm: create hotplug memory region for HVM guest Haozhong Zhang
2016-10-10  0:34 ` [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 ` [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=20161010003423.4333-1-haozhong.zhang@intel.com \
    --to=haozhong.zhang@intel.com \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sstabellini@kernel.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).