All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: xen-devel@lists.xen.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Gang Wei <gang.wei@intel.com>, Jan Beulich <jbeulich@suse.com>,
	Shane Wang <shane.wang@intel.com>,
	Chao Peng <chao.p.peng@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [RFC XEN PATCH v4 00/41] Add vNVDIMM support to HVM domains
Date: Mon, 12 Feb 2018 10:05:56 +0000	[thread overview]
Message-ID: <20180212100556.pg76xpb3vdkp257g@MacBook-Pro-de-Roger.local> (raw)
In-Reply-To: <20180212012542.2fn4anzvuuhcmvm4@hz-desktop>

On Mon, Feb 12, 2018 at 09:25:42AM +0800, Haozhong Zhang wrote:
> On 02/09/18 12:33 +0000, Roger Pau Monné wrote:
> > Thanks for the series, I'm however wondering whether it's appropriate
> > to post a v4 as RFC. Ie: at v4 the reviewer expects the submitter to
> > have a clear picture of what needs to be implemented.
> > 
> > On Thu, Dec 07, 2017 at 06:09:49PM +0800, Haozhong Zhang wrote:
> > > All patches can also be found at
> > >   Xen:  https://github.com/hzzhan9/xen.git nvdimm-rfc-v4
> > >   QEMU: https://github.com/hzzhan9/qemu.git xen-nvdimm-rfc-v4
> > > 
> > > RFC v3 can be found at
> > >   https://lists.xen.org/archives/html/xen-devel/2017-09/msg00964.html
> > > 
> > > Changes in v4:
> > >   * Move the functionality of management util 'xen-ndctl' to Xne
> > >     management tool 'xl'.
> > >   * Load QEMU ACPI via QEMU fw_cfg and BIOSLinkerLoader interface.
> > >   * Other changes are documented in patches separately.
> > > 
> > > 
> > > - Part 0. Bug fix and code cleanup
> > >   [01/41] x86_64/mm: fix the PDX group check in mem_hotadd_check()
> > >   [02/41] x86_64/mm: avoid cleaning the unmapped frame table
> > >   [03/41] hvmloader/util: do not compare characters after '\0' in strncmp
> > > 
> > > - Part 1. Detect host PMEM
> > >   Detect host PMEM via NFIT. No frametable and M2P table for them are
> > >   created in this part.
> > > 
> > >   [04/41] xen/common: add Kconfig item for pmem support
> > >   [05/41] x86/mm: exclude PMEM regions from initial frametable
> > >   [06/41] acpi: probe valid PMEM regions via NFIT
> > >   [07/41] xen/pmem: register valid PMEM regions to Xen hypervisor
> > >   [08/41] xen/pmem: hide NFIT and deny access to PMEM from Dom0
> > 
> > I'm afraid I might ask stupied questions, since I haven't followed the
> > design discussion of this series very closely.
> > 
> > So you basically hide the NVDIMM from Dom0, and only allow guests to
> > use it?
> 
> Yes, though I have some unsent patches (for vNVDIMM label support) to
> allow QEMU in dom0 to access NVDIMM via DMOP.
> 
> > 
> > What happens when you boot the same system without Xen? Will the
> > NVDIMM get corrupted because for example Linux will write something to
> > it?
> 
> Bare metal OS without Xen may write to NVDIMM which may or may not
> corrupt the data, depending on the existing data on NVDIMM and how
> other OS uses NVDIMM.
> 
> If the bare-metal OS uses NVDIMM, for example, as the volatile memory
> or the fast disk cache, then the random data may be dumped to NVDIMM
> and corrupt the existing data.
> 
> If the bare-metal OS treats NVDIMM as storage, it may probe certain
> structures (e.g., file systems) on NVDIMM before further operations
> and stop if such structures are not probed. In such case, the existing
> data on NVDIMM will not be corrupted.

OK. I have to admit my knowledge of NVDIMM is very limited. Is it
expected to for example partition a NVDIMM into several partitions and
maybe use one as disk cache and others as storage?

How would that be accomplished, using GPT for example? Or there's some
NVDIMM specific way to describe the layout?

Would it be conceivable to store Dom0 root filesystem in a NVDIMM
while also using it to provide storage to the guests?

> > 
> > >   [09/41] xen/pmem: add framework for hypercall XEN_SYSCTL_nvdimm_op
> > >   [10/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_rgions_nr
> > >   [11/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_regions
> > >   [12/41] tools/xl: add xl command 'pmem-list'
> > > 
> > > - Part 2. Setup host PMEM for management and guest data usage
> > >   Allow users or admins in Dom0 to setup host PMEM pages for
> > >   management and guest data usages.
> > >    * Management PMEM pages are used to store the frametable and M2P of
> > >      PMEM pages (including themselves), and never mapped to guest.
> > >    * Guest data PMEM pages can be mapped to guest and used as the
> > >      backend storage of virtual NVDIMM devices.
> > 
> > So this is basically tied to a PV Dom0, but I would like to also think
> > about what would happen with a PVH Dom0. In that case AFAICT Xen could
> > map the full NVDIMM to the Dom0 p2m as MMIO using 1GB pages, at which
> > point Dom0 could manage the NVDIMM as desired? Ie: Dom0 could map
> > parts of the NVDIMM to DomU as it maps other MMIO regions.
> 
> The primary reason I don't want to map NVDIMM to Dom0 (either PV or
> PVH) is the frame table and M2P table of NVDIMM are maintained on
> NVDIMM. Because NVDIMM is non-volatile and Xen has no idea of which
> portion of NVDIMM can be used for frame table and M2P, Xen needs the
> user input for such information (patch 18, 22, 23) after it boots
> up. That is, before Xen boots up, Xen cannot determine which portion
> of NVDIMM for its frame table and M2P that should not map to Dom0.

If you map the NVDIMM as MMIO to Dom0 you don't need the M2P entries
IIRC, and if it's mapped using 1GB pages it shouldn't use that much
memory for the page tables (ie: you could just use normal RAM for the
page tables that map the NVDIMM IMO). Of course that only applies to
PVH/HVM.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-02-12 10:05 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 10:09 [RFC XEN PATCH v4 00/41] Add vNVDIMM support to HVM domains Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 01/41] x86_64/mm: fix the PDX group check in mem_hotadd_check() Haozhong Zhang
2018-01-04  6:12   ` Chao Peng
2018-05-07 15:59   ` Jan Beulich
2017-12-07 10:09 ` [RFC XEN PATCH v4 02/41] x86_64/mm: avoid cleaning the unmapped frame table Haozhong Zhang
2018-01-04  6:20   ` Chao Peng
2017-12-07 10:09 ` [RFC XEN PATCH v4 03/41] hvmloader/util: do not compare characters after '\0' in strncmp Haozhong Zhang
2018-01-04  6:23   ` Chao Peng
2017-12-07 10:09 ` [RFC XEN PATCH v4 04/41] xen/common: add Kconfig item for pmem support Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 05/41] x86/mm: exclude PMEM regions from initial frametable Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 06/41] acpi: probe valid PMEM regions via NFIT Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 07/41] xen/pmem: register valid PMEM regions to Xen hypervisor Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 08/41] xen/pmem: hide NFIT and deny access to PMEM from Dom0 Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 09/41] xen/pmem: add framework for hypercall XEN_SYSCTL_nvdimm_op Haozhong Zhang
2017-12-07 10:09 ` [RFC XEN PATCH v4 10/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_rgions_nr Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 11/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_get_regions Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 12/41] tools/xl: add xl command 'pmem-list' Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 13/41] x86_64/mm: refactor memory_add() Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 14/41] x86_64/mm: allow customized location of extended frametable and M2P table Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 15/41] xen/pmem: add XEN_SYSCTL_nvdimm_pmem_setup to setup management PMEM region Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 16/41] tools/xl: accept all bases in parse_ulong() Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 17/41] tools/xl: expose parse_ulong() Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 18/41] tools/xl: add xl command 'pmem-setup' Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 19/41] xen/pmem: support PMEM_REGION_TYPE_MGMT for XEN_SYSCTL_nvdimm_pmem_get_regions_nr Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 20/41] xen/pmem: support PMEM_REGION_TYPE_MGMT for XEN_SYSCTL_nvdimm_pmem_get_regions Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 21/41] tools/xl: add option '--mgmt | -m' to xl command pmem-list Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 22/41] xen/pmem: support setup PMEM region for guest data usage Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 23/41] tools/xl: add option '--data | -d' to xl command pmem-setup Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 24/41] xen/pmem: support PMEM_REGION_TYPE_DATA for XEN_SYSCTL_nvdimm_pmem_get_regions_nr Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 25/41] xen/pmem: support PMEM_REGION_TYPE_DATA for XEN_SYSCTL_nvdimm_pmem_get_regions Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 26/41] tools/xl: add option '--data | -d' to xl command pmem-list Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 27/41] xen/pmem: add function to map PMEM pages to HVM domain Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 28/41] xen/pmem: release PMEM pages on HVM domain destruction Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 29/41] xen: add hypercall XENMEM_populate_pmem_map Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 30/41] tools: reserve extra guest memory for ACPI from device model Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 31/41] tools/libacpi: add callback to translate GPA to GVA Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 32/41] tools/libacpi: build a DM ACPI signature blacklist Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 33/41] tools/libacpi, hvmloader: detect QEMU fw_cfg interface Haozhong Zhang
2018-02-27 17:37   ` Anthony PERARD
2018-02-28  9:17     ` Haozhong Zhang
2018-03-02 11:26       ` Anthony PERARD
2018-03-05  7:55         ` Haozhong Zhang
2018-02-27 18:03   ` Anthony PERARD
2018-02-28  8:18     ` Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 34/41] tools/libacpi: probe QEMU ACPI ROMs via " Haozhong Zhang
2018-02-27 17:56   ` Anthony PERARD
2018-02-28  9:28     ` Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 35/41] tools/libacpi: add a QEMU BIOSLinkLoader executor Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 36/41] tools/libacpi: add function to get the data of QEMU RSDP Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 37/41] tools/libacpi: load QEMU ACPI Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 38/41] tools/xl: add xl domain configuration for virtual NVDIMM devices Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 39/41] tools/libxl: allow aborting domain creation on fatal QMP init errors Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 40/41] tools/libxl: initiate PMEM mapping via QMP callback Haozhong Zhang
2017-12-07 10:10 ` [RFC XEN PATCH v4 41/41] tools/libxl: build qemu options from xl vNVDIMM configs Haozhong Zhang
2017-12-07 10:18 ` [Qemu-devel] [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest Haozhong Zhang
2017-12-07 10:18   ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 01/10] xen-hvm: remove a trailing space Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 02/10] xen-hvm: create the hotplug memory region on Xen Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2018-02-27 16:37     ` [Qemu-devel] " Anthony PERARD
2018-02-27 16:37       ` Anthony PERARD
2018-02-28  7:47       ` [Qemu-devel] " Haozhong Zhang
2018-02-28  7:47       ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 03/10] hostmem-xen: add a host memory backend for Xen Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2018-02-27 16:41     ` [Qemu-devel] " Anthony PERARD
2018-02-27 16:41       ` Anthony PERARD
2018-02-28  7:56       ` [Qemu-devel] " Haozhong Zhang
2018-03-02 11:50         ` Anthony PERARD
2018-03-02 11:50           ` Anthony PERARD
2018-03-05  7:53           ` [Qemu-devel] " Haozhong Zhang
2018-03-05  7:53           ` Haozhong Zhang
2018-02-28  7:56       ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 04/10] nvdimm: do not intiailize nvdimm->label_data if label size is zero Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 05/10] xen-hvm: initialize fw_cfg interface Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2018-02-27 16:46     ` [Qemu-devel] " Anthony PERARD
2018-02-27 16:46       ` Anthony PERARD
2018-02-28  8:16       ` [Qemu-devel] " Haozhong Zhang
2018-02-28  8:16         ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 06/10] hw/acpi-build, xen-hvm: introduce a Xen-specific ACPI builder Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 07/10] xen-hvm: add functions to copy data from/to HVM memory Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 08/10] nvdimm acpi: add functions to access DSM memory on Xen Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 09/10] nvdimm acpi: add compatibility for 64-bit integer in ACPI 2.0 and later Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2017-12-07 10:18   ` [Qemu-devel] [RFC QEMU PATCH v4 10/10] xen-hvm: enable building NFIT and SSDT of vNVDIMM for HVM domains Haozhong Zhang
2017-12-07 10:18     ` Haozhong Zhang
2018-02-27 17:22   ` [Qemu-devel] [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest Anthony PERARD
2018-02-27 17:22     ` Anthony PERARD
2018-02-28  9:36     ` Haozhong Zhang
2018-02-28  9:36     ` [Qemu-devel] " Haozhong Zhang
2018-03-02 12:03       ` Anthony PERARD
2018-03-02 12:03         ` Anthony PERARD
2018-03-06  4:16         ` [Qemu-devel] [Xen-devel] " Haozhong Zhang
2018-03-06  4:16           ` Haozhong Zhang
2018-03-06 11:38           ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2018-03-06 11:38             ` Anthony PERARD
2018-02-09 12:33 ` [RFC XEN PATCH v4 00/41] Add vNVDIMM support to HVM domains Roger Pau Monné
2018-02-12  1:25   ` Haozhong Zhang
2018-02-12 10:05     ` Roger Pau Monné [this message]
2018-02-13 10:06       ` Jan Beulich
2018-02-13 10:29         ` Roger Pau Monné
2018-02-13 11:05           ` Jan Beulich
2018-02-13 11:13             ` Roger Pau Monné
2018-02-13 13:40               ` Jan Beulich
2018-02-13 15:39                 ` Roger Pau Monné
2018-02-15  6:59                   ` Haozhong Zhang
2018-02-15  6:44       ` Haozhong Zhang

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=20180212100556.pg76xpb3vdkp257g@MacBook-Pro-de-Roger.local \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=gang.wei@intel.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=shane.wang@intel.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.