All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: qemu-devel@nongnu.org, xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Chao Peng <chao.p.peng@linux.intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [Xen-devel] [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest
Date: Tue, 6 Mar 2018 12:16:08 +0800	[thread overview]
Message-ID: <20180306041608.mbr6b25y557awxrn@hz-desktop> (raw)
In-Reply-To: <20180302120323.GG1799@perard.uk.xensource.com>

On 03/02/18 12:03 +0000, Anthony PERARD wrote:
> On Wed, Feb 28, 2018 at 05:36:59PM +0800, Haozhong Zhang wrote:
> > On 02/27/18 17:22 +0000, Anthony PERARD wrote:
> > > On Thu, Dec 07, 2017 at 06:18:02PM +0800, Haozhong Zhang wrote:
> > > > This is the QEMU part patches that works with the associated Xen
> > > > patches to enable vNVDIMM support for Xen HVM domains. Xen relies on
> > > > QEMU to build guest NFIT and NVDIMM namespace devices, and allocate
> > > > guest address space for vNVDIMM devices.
> > > 
> > > I've got other question, and maybe possible improvements.
> > > 
> > > When QEMU build the ACPI tables, it also initialize some MemoryRegion,
> > > which use more guest memory. Do you know if those regions are used with
> > > your patch series on Xen?
> > 
> > Yes, that's why dm_acpi_size is introduced.
> > 
> > > Otherwise, we could try to avoid their
> > > creation with this:
> > > In xenfv_machine_options()
> > > m->rom_file_has_mr = false;
> > > (setting this in xen_hvm_init() would probably be better, but I havn't
> > > try)
> > 
> > If my memory is correct, simply setting rom_file_has_mr to false does
> > not work (though I cannot remind the exact reason). I'll have a look
> > as the code to refresh my memory.
> 
> I've played a bit with this idea, but without a proper NVDIMM available
> for the guest, so I don't know if it's going to work properly without
> the mr.
> 
> To make it work, I had to disable some code in acpi_build_update() that
> make use of the MemoryRegions, as well as an assert in acpi_setup().
> After those small hacks, I could boot the guest, and I've check that the
> expected ACPI tables where there, and they looked correct to my eyes.
> And least `ndctl list` works and showed the nvdimm (that I have
> configured on QEMU's cmdline).
> 
> But I may not have been far enough with my tests, and maybe something
> later relies on the MRs, especially the _DSM method that I don't know if
> it was working properly.
> 
> Anyway, that why I proposed the idea, and if we can avoid more
> uncertainty about how much guest memory QEMU is going to use, that would
> be good.
> 

Yes, I also tested some non-trivial _DSM methods and it looks rom
files without memory regions can work with Xen after some
modifications. I'll apply this idea in the next version if no other
issues are found.

Thanks,
Haozhong

WARNING: multiple messages have this Message-ID (diff)
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Chao Peng <chao.p.peng@linux.intel.com>,
	xen-devel@lists.xenproject.org,
	Dan Williams <dan.j.williams@intel.com>,
	Richard Henderson <rth@twiddle.net>,
	Xiao Guangrong <xiaoguangrong.eric@gmail.com>
Subject: Re: [RFC QEMU PATCH v4 00/10] Implement vNVDIMM for Xen HVM guest
Date: Tue, 6 Mar 2018 12:16:08 +0800	[thread overview]
Message-ID: <20180306041608.mbr6b25y557awxrn@hz-desktop> (raw)
In-Reply-To: <20180302120323.GG1799@perard.uk.xensource.com>

On 03/02/18 12:03 +0000, Anthony PERARD wrote:
> On Wed, Feb 28, 2018 at 05:36:59PM +0800, Haozhong Zhang wrote:
> > On 02/27/18 17:22 +0000, Anthony PERARD wrote:
> > > On Thu, Dec 07, 2017 at 06:18:02PM +0800, Haozhong Zhang wrote:
> > > > This is the QEMU part patches that works with the associated Xen
> > > > patches to enable vNVDIMM support for Xen HVM domains. Xen relies on
> > > > QEMU to build guest NFIT and NVDIMM namespace devices, and allocate
> > > > guest address space for vNVDIMM devices.
> > > 
> > > I've got other question, and maybe possible improvements.
> > > 
> > > When QEMU build the ACPI tables, it also initialize some MemoryRegion,
> > > which use more guest memory. Do you know if those regions are used with
> > > your patch series on Xen?
> > 
> > Yes, that's why dm_acpi_size is introduced.
> > 
> > > Otherwise, we could try to avoid their
> > > creation with this:
> > > In xenfv_machine_options()
> > > m->rom_file_has_mr = false;
> > > (setting this in xen_hvm_init() would probably be better, but I havn't
> > > try)
> > 
> > If my memory is correct, simply setting rom_file_has_mr to false does
> > not work (though I cannot remind the exact reason). I'll have a look
> > as the code to refresh my memory.
> 
> I've played a bit with this idea, but without a proper NVDIMM available
> for the guest, so I don't know if it's going to work properly without
> the mr.
> 
> To make it work, I had to disable some code in acpi_build_update() that
> make use of the MemoryRegions, as well as an assert in acpi_setup().
> After those small hacks, I could boot the guest, and I've check that the
> expected ACPI tables where there, and they looked correct to my eyes.
> And least `ndctl list` works and showed the nvdimm (that I have
> configured on QEMU's cmdline).
> 
> But I may not have been far enough with my tests, and maybe something
> later relies on the MRs, especially the _DSM method that I don't know if
> it was working properly.
> 
> Anyway, that why I proposed the idea, and if we can avoid more
> uncertainty about how much guest memory QEMU is going to use, that would
> be good.
> 

Yes, I also tested some non-trivial _DSM methods and it looks rom
files without memory regions can work with Xen after some
modifications. I'll apply this idea in the next version if no other
issues are found.

Thanks,
Haozhong

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

  reply	other threads:[~2018-03-06  4:16 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         ` Haozhong Zhang [this message]
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é
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=20180306041608.mbr6b25y557awxrn@hz-desktop \
    --to=haozhong.zhang@intel.com \
    --cc=anthony.perard@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ehabkost@redhat.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.xenproject.org \
    --cc=xiaoguangrong.eric@gmail.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 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.