[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC QEMU PATCH 0/8] Implement vNVDIMM for Xen HVM guest



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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.