On 03/02/18 12:03 +, Anthony PERARD wrote:
> On Wed, Feb 28, 2018 at 05:36:59PM +0800, Haozhong Zhang wrote:
> > On 02/27/18 17:22 +, Anthony PERARD wrote:
> > > On Thu, Dec 07, 2017 at 06:18:02PM +0800, Haozhong Zhang wrote:
> > > > This is the QEMU pa
On 03/02/18 11:26 +, Anthony PERARD wrote:
> On Wed, Feb 28, 2018 at 05:17:23PM +0800, Haozhong Zhang wrote:
> > On 02/27/18 17:37 +, Anthony PERARD wrote:
> > > On Thu, Dec 07, 2017 at 06:10:22PM +0800, Haozhong Zhang wrote:
> > > > Add a function in
On 03/02/18 11:50 +, Anthony PERARD wrote:
> On Wed, Feb 28, 2018 at 03:56:54PM +0800, Haozhong Zhang wrote:
> > On 02/27/18 16:41 +, Anthony PERARD wrote:
> > > On Thu, Dec 07, 2017 at 06:18:05PM +0800, Haozhong Zhang wrote:
> > > > @@ -108,7 +109,
On 02/27/18 17:22 +, 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
On 02/27/18 17:56 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:10:23PM +0800, Haozhong Zhang wrote:
> > Probe following QEMU ACPI ROMs:
> > * etc/acpi/rsdp: QEMU RSDP, which is used to iterate other
> > QEMU ACPI tables in etc/acpi/t
On 02/27/18 17:37 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:10:22PM +0800, Haozhong Zhang wrote:
> > Add a function in libacpi to detect QEMU fw_cfg interface. Limit the
> > usage of fw_cfg interface to hvmloader now, so use stub functions for
> > others.
&g
On 02/27/18 18:03 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:10:22PM +0800, Haozhong Zhang wrote:
> > diff --git a/tools/libacpi/qemu_fw_cfg.c b/tools/libacpi/qemu_fw_cfg.c
> > new file mode 100644
> > index 00..254d2f575d
> > --- /dev/n
On 02/27/18 16:46 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:18:07PM +0800, Haozhong Zhang wrote:
> > Xen is going to reuse QEMU to build ACPI of some devices (e.g., NFIT
> > and SSDT for NVDIMM) for HVM domains. The existing QEMU ACPI build
> > code requir
On 02/27/18 16:41 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:18:05PM +0800, Haozhong Zhang wrote:
> > diff --git a/backends/hostmem.c b/backends/hostmem.c
> > index ee2c2d5bfd..ba13a52994 100644
> > --- a/backends/hostmem.c
> > +++ b/backends/h
On 02/27/18 16:37 +, Anthony PERARD wrote:
> On Thu, Dec 07, 2017 at 06:18:04PM +0800, Haozhong Zhang wrote:
> > The guest physical address of vNVDIMM is allocated from the hotplug
> > memory region, which is not created when QEMU is used as Xen device
> > model. In ord
On 02/13/18 15:39 +, Roger Pau Monné wrote:
> On Tue, Feb 13, 2018 at 06:40:20AM -0700, Jan Beulich wrote:
> > >>> On 13.02.18 at 12:13, wrote:
> > > On Tue, Feb 13, 2018 at 04:05:45AM -0700, Jan Beulich wrote:
> > >> >>> On 13.02.18 at 11:29, wrote:
> > >> > On Tue, Feb 13, 2018 at 03:06:24A
On 02/12/18 10:05 +, Roger Pau Monné wrote:
> On Mon, Feb 12, 2018 at 09:25:42AM +0800, Haozhong Zhang wrote:
> > On 02/09/18 12:33 +, Roger Pau Monné wrote:
> > > Thanks for the series, I'm however wondering whether it's appropriate
> > > to pos
ncy in valid_numa_range(), since
most of other places use the latter interpretation.
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/srat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index 528ec7181a..49d04b887b 100644
--- a/xen/ar
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:
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc: Anthony Perard
Cc: Paolo Bonzini
Cc: Richard Henderson
Cc: Eduardo Habkost
Cc: "Michael S. Tsirkin"
---
hw/i386/xen/xen-hvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/xen/xen-hvm.c b/h
x1:
-object memory-backend-xen,id=mem1,host-addr=0x1,size=4G
-device nvdimm,id=nvdimm1,memdev=mem1
Signed-off-by: Haozhong Zhang
---
Cc: Eduardo Habkost
Cc: Igor Mammedov
Cc: "Michael S. Tsirkin"
---
backends/Makefile.objs | 1 +
backends
QEMU on KVM/TCG and Xen requires different sets of guest ACPI tables.
When QEMU builds ACPI for Xen HVM domains, the new Xen-specific ACPI
build function xen_acpi_build() is called instead of the existing path
from acpi_build().
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc: Anthony Perard
Cc: Paolo Bonzini
Cc: Richard Henderson
Cc: Eduardo Habkost
Cc: "Michael S. Tsirkin"
---
hw/i386/xen/xen-hvm.c | 55 +++
include/hw/xen/xen.h | 3 +++
built by QEMU.
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc: Anthony Perard
Cc: "Michael S. Tsirkin"
Cc: Paolo Bonzini
Cc: Richard Henderson
Cc: Eduardo Habkost
---
hw/i386/xen/xen-hvm.c | 12
1 file changed, 12 insertions(+)
diff --git a/hw/i386/xen/xen-
When QEMU is used the device model of Xen HVM domain and vNVDIMM
devices are present, enable building ACPI tables related to vNVDIMM.
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc: Anthony Perard
Cc: "Michael S. Tsirkin"
Cc: Paolo Bonzini
Cc: Richard Henderson
C
is issue, we add a 32-bit reserved field after
func_ret_status and always fill it with 0. Therefore, the minimum
length of ODAT in both ACPI 1.0 and ACPI 2.0 is always 8 bytes, so no
extra bytes will be added accidentally by the implicit conversion.
Signed-off-by: Haozhong Zhang
---
Cc: Xiao Guangrong
the Xen side support for labels is not implemented yet.
Patch 5-10 enable building ACPI tables and passing them to Xen HVM
domains.
Haozhong Zhang (10):
[01/10] xen-hvm: remove a trailing space
[02/10] xen-hvm: create the hotplug memory region on Xen
[03/10] hostmem-xen: add a host memory
hvmloader memory in DSM emulation,
it has to take a different path, i.e., xen_copy_{from,to}_guest().
Signed-off-by: Haozhong Zhang
---
Cc: Xiao Guangrong
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
---
hw/acpi/nvdimm.c | 44 +---
1 file c
QEMU to labels is led by a label size check,
let's not intiailize nvdimm->label_data if the label size is 0.
Signed-off-by: Haozhong Zhang
---
Cc: Xiao Guangrong
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
---
hw/mem/nvdimm.c | 10 +-
1 file changed, 9 insertions(+), 1
.
Signed-off-by: Haozhong Zhang
---
Cc: "Michael S. Tsirkin"
Cc: Paolo Bonzini
Cc: Richard Henderson
Cc: Eduardo Habkost
Cc: Stefano Stabellini
Cc: Anthony Perard
---
hw/i386/pc.c | 86 ---
hw/i386/xen/xen-hvm.c | 2 ++
include/hw
mm1,memdev=mem1
...
in which,
- NR_SLOTS is the number of entries in vnvdimms + 1,
- MEM_SIZE is the total size of all RAM and NVDIMM devices,
- PMEM0_ADDR = PMEM0_MFN * 4096,
- PMEM0_SIZE = N0 * 4096,
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl
The base guest physical address of each vNVDIMM device is decided by
QEMU. Add a QMP callback to get the base address from QEMU and query Xen
hypervisor to map host PMEM pages to that address.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_internal.h | 6
pmem_populate() is added to map the specifed data PMEM pages to a HVM
domain. No called is added in this commit.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei
efore.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_create.c | 4 +++-
tools/libxl/libxl_qmp.c| 9 ++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index f15fb215c2..07585
Allow the command XEN_SYSCTL_nvdimm_pmem_setup of hypercall
XEN_SYSCTL_nvdimm_op to setup a PMEM region for guest data
usage. After the setup, that PMEM region will be able to be
mapped to guest address space.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc
'xl pmem-list --data | -d' is used to list all data PMEM regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_nvdimm.c | 4
tools/libxl/libxl_types.idl | 9 +
tools/xl/xl_cmdtable.c | 1 +
tools/xl/xl_nvdimm.c
A new xl domain configuration
vnvdimms = [ 'type=mfn, backend=START_PMEM_MFN, nr_pages=N', ... ]
is added to specify the virtual NVDIMM devices backed by the specified
host PMEM pages. As the kernel PMEM driver does not work in Dom0 now,
we have to specify MFNs.
Signed-off-by: Haoz
Allow XEN_SYSCTL_nvdimm_pmem_get_regions_nr to return the number of
management PMEM regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
---
tools/libxc
executed to load QEMU ACPI tables
* etc/acpi/nvdimm-mem: RAM which is used as NVDIMM ACPI DSM buffer,
the exact location will be allocated during
the execution of /etc/table-loader
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
This hypercall will be used by device models to map host PMEM pages to
guest.
Signed-off-by: Haozhong Zhang
---
Cc: Daniel De Graaf
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
---
tools
Some guest ACPI tables are built by Xen and should not be loaded from
device model (DM). We add signatures of Xen-built ACPI tables except
SSDT in a blacklist, so that we can check DM-built ACPI tables against
it later.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Ian Jackson
Cc: Wei
'xl pmem-list --mgmt | -m' is used to list all management regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_nvdimm.c | 4
tools/libxl/libxl_types.idl | 8
tools/xl/xl_cmdtable.c | 1 +
tools/xl/xl_nvdimm.c
Allow XEN_SYSCTL_nvdimm_pmem_get_regions to return a list of
management PMEM regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
---
tools/libxc
If libacpi detects QEMU fw_cfg interface, it will try to detect and
execute QEMU BIOSLinkerLoader ROM to load QEMU-built ACPI. If any QEMU
ACPI table is conflict with Xen-built ACPI tables, libacpi will refuse
to load all QEMU ACPI tables.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc
The executor loads and executes the QEMU BIOSLinkerLoader ROM
etc/table-loader. It currently supports three BIOSLinkerLoader
commands ALLOCATE, POINTER and CHECKSUM, which are enough to load
currently supported QEMU ROMs.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Ian Jackson
Cc
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libacpi/qemu.h| 2 ++
tools/libacpi/qemu_loader.c | 8
tools/libacpi/qemu_stub.c | 5 +
3 files changed, 15 insertions(+)
diff --git a/tools/libacpi/qemu.h b/tools/libacpi/qemu.h
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/xl/xl_parse.c | 2 +-
tools/xl/xl_parse.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 81a50f2edb..993b754c0a 100644
--- a/tools/xl/xl_parse.c
+++ b
'xl pmem-setup --data | -d' is used to setup the specified PMEM region
for guest data usage.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl.h| 17 +
tools/libxl/libxl_nvdimm.c | 13 +
tools/xl/xl_cmdtable.
The location of ACPI blobs passed from device modeil is offered in
guest physical address. libacpi needs to convert the guest physical
address to guest virtual address before it can access those ACPI
blobs.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc
of device model and the domain config, we
still add an xl domain config 'dm_acpi_size' to allow users to specify
the required size when the default value is not enough.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
docs/man/xl.cfg.pod.5.in| 7 +++
t
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/xl/xl_parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 9a692d5ae6..81a50f2edb 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -387,7
management PMEM region should not be
mapped to guest.
PMEM pages are not added in any Xen or domain heaps. A new flag
PGC_pmem_page is used to indicate whether a page is from PMEM and
avoid returning PMEM pages to heaps.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
A new step RELMEM_pmem is added and taken before RELMEM_xen to release
all PMEM pages mapped to a HVM domain.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
Allow XEN_SYSCTL_nvdimm_pmem_get_regions_nr to return the number of
data PMEM regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
---
tools/libxc
Add a function in libacpi to detect QEMU fw_cfg interface. Limit the
usage of fw_cfg interface to hvmloader now, so use stub functions for
others.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano
Allow XEN_SYSCTL_nvdimm_pmem_get_regions to return a list of data PMEM
regions.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
---
tools/libxc/xc_misc.c
pages before the their
actual resource is allocated, implies bugs in Xen. Therefore, the
read-only mapping is used here to make those bugs explicit.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano
has enough knowledge of the mapping status.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
@Chao: I don't modify this patch per your comment, because I feel it's
better to handle the errors locally in each function (rather than handle
all of them in the top-level),
The current check refuses the hot-plugged memory that falls in one
unused PDX group, which should be allowed.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
---
xen/arch/x86/x86_64/mm.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/xen/arch/x86
Separate the revertible part of memory_add_common(), which will also
be used in PMEM management. The separation will ease the failure
recovery in PMEM management. Several coding-style issues in the
touched code are fixed as well.
No functional change is introduced.
Signed-off-by: Haozhong Zhang
... to make its behavior the same as C standard (e.g., C99 and C11).
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc: Wei Liu
---
tools/firmware/hvmloader/util.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/firmware/hvmloader/util.c
allocated pages can be reclaimed or has no effect out of
memory_add_common(), if memory_add_common() fails.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
---
xen/arch/x86/x86_64/mm.c | 83
1 file changed, 69 insertions
XEN_SYSCTL_nvdimm_op will support a set of sub-commands to manage the
physical NVDIMM devices. This commit just adds the framework for this
hypercall, and does not implement any sub-commands.
Signed-off-by: Haozhong Zhang
---
Cc: Daniel De Graaf
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
The new xl command 'pmem-setup' with '-m' option is used to setup the
specified PMEM region for the management usage.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl.h| 13
tools/libxl/libxl_nvdimm.c | 11 +
... to avoid the inference with the PMEM driver and management
utilities in Dom0.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
Cc: Gang Wei
Cc: Shane Wang
The new xl command 'pmem-list' is used to list the information of PMEM
regions.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
---
tools/libx
XEN_SYSCTL_nvdimm_pmem_get_regions, which is a command of hypercall
XEN_SYSCTL_nvdimm_op, is to get a list of PMEM regions of specified
type (see PMEM_REGION_TYPE_*).
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Cc: Konrad
those failure are left out of Xen (e.g. left
to the firmware or other management utilities on the bare metal).
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
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 managem
XEN_SYSCTL_nvdimm_pmem_get_rgions_nr, which is a command of hypercall
XEN_SYSCTL_nvdimm_op, is to get the number of PMEM regions of the
specified type (see PMEM_REGION_TYPE_*).
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Jan Beulich
Register valid PMEM regions probed via NFIT to Xen hypervisor. No
frametable and M2P table are created for those PMEM regions at this
stage.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Add CONFIG_PMEM to enable NVDIMM persistent memory support. By
default, it's N.
Signed-off-by: Haozhong Zhang
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
---
xen/common/Kconfi
67 matches
Mail list logo