On 12/16/16 20:59 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
Fault #GP(0) is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests
On 12/16/16 20:40 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
+static uint8_t get_cpu_paddr_bits(void)
+{
+uint8_t paddr_bits = 36;
+uint32_t eax;
+
+eax = cpuid_eax(0x8000);
+if ( (eax >> 16) == 0x8000 && eax >= 0x8008 )
+
On 12/16/16 20:33 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 31f074c..ca33b3c 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -28,11 +28,42 @@ static bool test_vmxon_novmxe(void
On 12/16/16 20:25 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
diff --git a/tests/vvmx/util.c b/tests/vvmx/util.c
index 74b4d01..f30fc26 100644
--- a/tests/vvmx/util.c
+++ b/tests/vvmx/util.c
@@ -1,7 +1,31 @@
#include
+#include
#include
#include "util.h"
On 12/16/16 20:16 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
handle_vmxinsn_err() is added to check and output the mismatch between
errors in the execution of a VMX instruction and the expected errors.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/util.c | 104
On 12/16/16 19:03 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
diff --git a/include/arch/x86/hvm/vmx/vmcs.h b/include/arch/x86/hvm/vmx/vmcs.h
new file mode 100644
index 000..e1a6ef8
--- /dev/null
+++ b/include/arch/x86/hvm/vmx/vmcs.h
@@ -0,0 +1,179 @@
+#ifndef
On 12/16/16 19:47 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
Review of the technical side of the patch, leaving the licensing to the
other thread.
Reordering for better logical clarity for my suggestion.
diff --git a/tests/vvmx/util.h b/tests/vvmx/util.h
new file
On 12/16/16 17:19 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
It tests whether bit 31 and bit 48 are 0, and VMCS size is in the
range (0, 4096].
Signed-off-by: Haozhong Zhang
---
include/arch/x86/msr-index.h | 4
tests/vvmx/msr.c | 47
On 12/16/16 16:17 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
diff --git a/tests/vvmx/msr.c b/tests/vvmx/msr.c
new file mode 100644
index 000..100491d
--- /dev/null
+++ b/tests/vvmx/msr.c
@@ -0,0 +1,67 @@
+#include
+
+#include
+
+/*
+ * NB. Guest
On 12/16/16 14:40 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
diff --git a/tests/vvmx/cpuid.c b/tests/vvmx/cpuid.c
new file mode 100644
index 000..9a4cdae
--- /dev/null
+++ b/tests/vvmx/cpuid.c
@@ -0,0 +1,24 @@
+#include
+
+bool test_cpuid_vmx_feat(void
On 12/16/16 14:12 +, Andrew Cooper wrote:
On 16/12/16 13:43, Haozhong Zhang wrote:
This patch series starts to add a test selection "test-hvm64-vvmx" for
nested VMX. This first series focuses mostly on nested vmxon.
* Patch 01 - 03 test the basic environment (cpuid and MSR).
c/s 08fac63 misused v->domain-arch.paging.gfn_bits as the width of
guest physical address and missed adding PAGE_SHIFT to it when
checking vmxon operand.
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/vmx/vvmx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/a
On 12/14/16 18:11 +0800, Haozhong Zhang wrote:
Check whether the operand of L1 vmxon is a valid VMXON region address
and whether the VMXON region at that address contains a valid revision
ID.
Signed-off-by: Haozhong Zhang
Reviewed-by: Andrew Cooper
Reviewed-by: Konrad Rzeszutek Wilk
Acked-by
VMfailInvalid is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 75b6dcb..268baa8 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -118,6
Fault #GP(0) is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 0664a48..ec7ee7e 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
VMfailInvalid is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index a41f101..0664a48 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -149,6
handle_vmxinsn_err() is added to check and output the mismatch between
errors in the execution of a VMX instruction and the expected errors.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/util.c | 104 ++
tests/vvmx/util.h | 17 +
2
No error is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 268baa8..a41f101 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -134,6
Fault #GP(0) is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 20
1 file changed, 20 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 705a04d..c8f2852 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -209,6
VMfailvalid(15) is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index ec7ee7e..705a04d 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx
VMfailInvalid is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index f230fdf..75b6dcb 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -102,6
VMfailInvalid is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index ca33b3c..8147679 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx
Fault #UD is expected in this test.
Signed-off-by: Haozhong Zhang
---
include/arch/x86/msr-index.h | 1 +
tests/vvmx/Makefile | 2 +-
tests/vvmx/main.c| 4
tests/vvmx/util.c| 24 ++
tests/vvmx/util.h| 18
.
Signed-off-by: Haozhong Zhang
---
include/arch/x86/hvm/vmx/vmcs.h | 179
tests/vvmx/Makefile | 2 +-
tests/vvmx/util.c | 83 +++
tests/vvmx/util.h | 78 +
tests/vvmx/vmxon.c
.
* Patch 06 - 16 construct a bunch of test cases for nested vmxon per
its pseudo code in section "VMXON - Enter VMX Operation" of Intel
SDM Vol 3.
Haozhong Zhang (16):
01/ vvmx: test whether VMX feature is present in CPUID
02/ vvmx: test whether MSR_IA32_FEATURE_CONTROL is set
VMfailInvalid is expected in this case.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/vmxon.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c
index 8147679..f230fdf 100644
--- a/tests/vvmx/vmxon.c
+++ b/tests/vvmx/vmxon.c
@@ -87,6
Guest MSR_IA32_FEATURE_CONTROL is set by Xen hypervisor instead by
guest firmware or hvmloader, so this test instead checks whether bits
in MSR_IA32_FEATURE_CONTROL are set correctly, rather than requiring
they are all zeroed.
Signed-off-by: Haozhong Zhang
---
include/arch/x86/msr-index.h | 5
Fault #GP(0) is expected in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/main.c | 2 ++
tests/vvmx/vmxon.c | 31 +++
2 files changed, 33 insertions(+)
diff --git a/tests/vvmx/main.c b/tests/vvmx/main.c
index cec9057..c1852fd 100644
--- a/tests/vvmx
It tests whether bit 31 and bit 48 are 0, and VMCS size is in the
range (0, 4096].
Signed-off-by: Haozhong Zhang
---
include/arch/x86/msr-index.h | 4
tests/vvmx/msr.c | 47
2 files changed, 51 insertions(+)
diff --git a/include
cpuid.1:ecx[5] is expected to be set in this test.
Signed-off-by: Haozhong Zhang
---
tests/vvmx/Makefile | 11 +++
tests/vvmx/cpuid.c | 24
tests/vvmx/extra.cfg.in | 1 +
tests/vvmx/main.c | 44
4
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor.
Signed-off-by: Haozhong Zhang
Acked-by: Andrew Cooper
---
Changes in v3:
* Replace
On 12/15/16 12:18 +, Andrew Cooper wrote:
On 15/12/16 12:06, Haozhong Zhang wrote:
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor.
Signed-off-by: Haozhong Zhang
---
Changes in v2:
* Fix the incorrect eflags in
On 12/14/16 19:29 +0800, Haozhong Zhang wrote:
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor.
Signed-off-by: Haozhong Zhang
---
* This
On 12/14/16 11:55 +, Andrew Cooper wrote:
On 14/12/16 11:29, Haozhong Zhang wrote:
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor
Replace vmreturn() by vmsucceed(), vmfail(), vmfail_valid() and
vmfail_invalid(), which are consistent to the pseudo code on Intel
SDM, and allow to return VM instruction error numbers to L1
hypervisor.
Signed-off-by: Haozhong Zhang
---
* This patch is based on my patchset "[PATCH v2 0/4]
On 12/14/16 18:11 +0800, Haozhong Zhang wrote:
... because INVALID_PADDR is a more general one.
Suggested-by: Jan Beulich
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/nestedhvm.c | 2 +-
xen/arch/x86/hvm/svm/nestedsvm.c | 18 +-
xen/arch/x86/hvm/svm/vmcb.c | 2
Check whether the operand of L1 vmxon is a valid VMXON region address
and whether the VMXON region at that address contains a valid revision
ID.
Signed-off-by: Haozhong Zhang
Reviewed-by: Andrew Cooper
Reviewed-by: Konrad Rzeszutek Wilk
Acked-by: Kevin Tian
---
xen/arch/x86/hvm/vmx/vvmx.c
According to Intel SDM, section "VMXON - Enter VMX Operation", a
VMfail should be returned to L1 hypervisor if L1 vmxon is executed in
VMX operation, rather than just print a warning message.
Signed-off-by: Haozhong Zhang
Reviewed-by: Andrew Cooper
Acked-by: Kevin Tian
---
xen/ar
her than introducing a new
one in patch 1. (Jan Beulich)
* Add patch 4 to replace VMCX_EADDR by INVALID_PADDR. (Jan Beulich)
Haozhong Zhang (4):
vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address
vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operati
... because INVALID_PADDR is a more general one.
Suggested-by: Jan Beulich
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/nestedhvm.c | 2 +-
xen/arch/x86/hvm/svm/nestedsvm.c | 18 +-
xen/arch/x86/hvm/svm/vmcb.c | 2 +-
xen/arch/x86/hvm/vmx/vvmx.c | 16
an invalid VMXON region address for vcpu
out of VMX operation.
Signed-off-by: Haozhong Zhang
Reviewed-by: Andrew Cooper
Reviewed-by: Konrad Rzeszutek Wilk
Acked-by: Kevin Tian
---
xen/arch/x86/hvm/vmx/vvmx.c| 13 +
xen/include/asm-x86/hvm/vmx/vvmx.h | 7 +++
2 files
On 12/13/16 08:21 -0700, Jan Beulich wrote:
On 13.12.16 at 13:16, wrote:
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -32,6 +32,18 @@ static DEFINE_PER_CPU(u64 *, vvmcs_buf);
static void nvmx_purge_vvmcs(struct vcpu *v);
+/*
+ * When a vcpu is out of VMXON region, s
On 12/13/16 10:16 -0500, Konrad Rzeszutek Wilk wrote:
On Tue, Dec 13, 2016 at 08:16:19PM +0800, Haozhong Zhang wrote:
According to Intel SDM, section "VMXON - Enter VMX Operation", a
VMfail should be returned to L1 hypervisor if L1 vmxon is executed in
VMX operation, rather than ju
an invalid VMXON region address for vcpu
out of VMX operation.
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/vmx/vvmx.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index e6e9ebd..f5637eb
According to Intel SDM, section "VMXON - Enter VMX Operation", a
VMfail should be returned to L1 hypervisor if L1 vmxon is executed in
VMX operation, rather than just print a warning message.
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/vmx/vvmx.c | 9 ++---
1 file
This patchset fixes bugs and adds missing checks in nvmx_handle_vmxon(),
in order to make it more consistent to Intel SDM (section "VMXON - Enter
VMX Operation" in Vol 3).
Haozhong Zhang (3):
vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address
vvmx: return
Check whether the operand of L1 vmxon is a valid VMXON region address
and whether the VMXON region at that address contains a valid revision
ID.
Signed-off-by: Haozhong Zhang
---
xen/arch/x86/hvm/vmx/vvmx.c | 16
1 file changed, 16 insertions(+)
diff --git a/xen/arch/x86/hvm
On 12/12/16 09:44 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Dec 12, 2016 at 04:38:38PM +0800, Haozhong Zhang wrote:
On 12/12/16 01:30 -0700, Jan Beulich wrote:
> > > > On 12.12.16 at 05:16, wrote:
> > On 12/09/16 17:02 -0500, Konrad Rzeszutek Wilk wrote:
> > > On
On 12/12/16 01:30 -0700, Jan Beulich wrote:
On 12.12.16 at 05:16, wrote:
On 12/09/16 17:02 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:22AM +0800, Haozhong Zhang wrote:
+static int pmem_add_check(unsigned long spfn, unsigned long epfn
On 12/12/16 01:26 -0700, Jan Beulich wrote:
On 12.12.16 at 03:31, wrote:
On 12/09/16 16:38 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:21AM +0800, Haozhong Zhang wrote:
@@ -1427,7 +1429,7 @@ int memory_add(unsigned long spfn, unsigned long epfn,
unsigned int pxm
On 12/09/16 17:27 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:24AM +0800, Haozhong Zhang wrote:
The host pmem pages mapped to a domain are unassigned at domain destroy
so as to be used by other domains in future.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc
On 12/09/16 17:22 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:23AM +0800, Haozhong Zhang wrote:
XENMEM_populate_pmemmap is used by toolstack to map given host pmem pages
to given guest pages. Only pages in the data area of a pmem region are
allowed to be mapped to guest
On 12/09/16 17:02 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:22AM +0800, Haozhong Zhang wrote:
Xen hypervisor does not include a pmem driver. Instead, it relies on the
pmem driver in Dom0 to report the PFN ranges of the entire pmem region,
its reserved area and data area
On 12/09/16 16:38 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:21AM +0800, Haozhong Zhang wrote:
A reserved area on each pmem region is used to place the M2P table.
However, it's not at the beginning of the pmem region, so we need to
specify the location explicitly
On 12/09/16 16:35 -0500, Konrad Rzeszutek Wilk wrote:
On Mon, Oct 10, 2016 at 08:32:20AM +0800, Haozhong Zhang wrote:
A reserved area on each pmem region is used to place the frame table.
However, it's not at the beginning of the pmem region, so we need to
specify the location explicitly
On 10/24/16 17:37 +0100, Wei Liu wrote:
Hi Haozhong
All the toolstack patches seem to be tied to the hypervisor interface.
Given that the final design of how nvdimm is expected to work in Xen is
still under discussion, I think I'm going to shelve these patches for
now.
If you mean Patch 13 -
On 10/14/16 04:16 -0600, Jan Beulich wrote:
On 13.10.16 at 17:46, wrote:
On 10/13/16 03:08 -0600, Jan Beulich wrote:
On 13.10.16 at 10:53, wrote:
On 10/13/16 02:34 -0600, Jan Beulich wrote:
On 12.10.16 at 18:19, wrote:
On Wed, Oct 12, 2016 at 9:01 AM, Jan Beulich wrote:
On 12.10.16 at 1
On 10/14/16 13:18 +0100, Andrew Cooper wrote:
On 14/10/16 08:08, Haozhong Zhang wrote:
On 10/13/16 20:33 +0100, Andrew Cooper wrote:
On 13/10/16 19:59, Dan Williams wrote:
On Thu, Oct 13, 2016 at 9:01 AM, Andrew Cooper
wrote:
On 13/10/16 16:40, Dan Williams wrote:
On Thu, Oct 13, 2016 at 2
On 10/13/16 20:33 +0100, Andrew Cooper wrote:
On 13/10/16 19:59, Dan Williams wrote:
On Thu, Oct 13, 2016 at 9:01 AM, Andrew Cooper
wrote:
On 13/10/16 16:40, Dan Williams wrote:
On Thu, Oct 13, 2016 at 2:08 AM, Jan Beulich wrote:
[..]
I think we can do the similar for Xen, like to lay anoth
On 10/13/16 03:08 -0600, Jan Beulich wrote:
On 13.10.16 at 10:53, wrote:
On 10/13/16 02:34 -0600, Jan Beulich wrote:
On 12.10.16 at 18:19, wrote:
On Wed, Oct 12, 2016 at 9:01 AM, Jan Beulich wrote:
On 12.10.16 at 17:42, wrote:
On Wed, Oct 12, 2016 at 8:39 AM, Jan Beulich wrote:
On 12.1
+Dan Williams
I accidentally dropped him in my last reply. Add him back.
On 10/13/16 16:53 +0800, Haozhong Zhang wrote:
On 10/13/16 02:34 -0600, Jan Beulich wrote:
On 12.10.16 at 18:19, wrote:
On Wed, Oct 12, 2016 at 9:01 AM, Jan Beulich wrote:
On 12.10.16 at 17:42, wrote:
On Wed, Oct
On 10/13/16 02:34 -0600, Jan Beulich wrote:
On 12.10.16 at 18:19, wrote:
On Wed, Oct 12, 2016 at 9:01 AM, Jan Beulich wrote:
On 12.10.16 at 17:42, wrote:
On Wed, Oct 12, 2016 at 8:39 AM, Jan Beulich wrote:
On 12.10.16 at 16:58, wrote:
On 10/12/16 05:32 -0600, Jan Beulich wrote:
On 12.1
On 10/12/16 05:32 -0600, Jan Beulich wrote:
On 12.10.16 at 12:33, wrote:
The layout is shown as the following diagram.
+---+---+---+--+--+
| whatever used | Partition | Super | Reserved | /dev/pmem0p1 |
| by kernel| Table | Block | for Xen
On 10/11/16 13:17 -0700, Dan Williams wrote:
On Tue, Oct 11, 2016 at 12:48 PM, Konrad Rzeszutek Wilk
wrote:
On Tue, Oct 11, 2016 at 12:28:56PM -0700, Dan Williams wrote:
On Tue, Oct 11, 2016 at 11:33 AM, Konrad Rzeszutek Wilk
wrote:
> On Tue, Oct 11, 2016 at 10:51:19AM -0700, Dan Williams wro
On 10/11/16 10:22, Markus Armbruster wrote:
> Haozhong Zhang writes:
>
> > On 10/10/16 14:16, Eric Blake wrote:
> >> On 10/09/2016 07:34 PM, Haozhong Zhang wrote:
> >> > Xen uses this command to get the backend resource, guest SPA and size of
> >> &
Hi Paul,
On 10/10/16 13:31, Lai, Paul wrote:
> Hi Shannon:
>
> I’m reporting that commit 38cd0664a6bf1c3b887992ea029d2bb516f52c59 is causing
> a
> hang in the `xl create windows7` command on my skylake desktop. This is a
> regression from previous behavior.
>
I think it has been fixed by commi
On 10/10/16 09:24, Dan Williams wrote:
> On Sun, Oct 9, 2016 at 11:32 PM, Haozhong Zhang
> wrote:
> > On 10/09/16 20:45, Dan Williams wrote:
> >> On Sun, Oct 9, 2016 at 5:35 PM, Haozhong Zhang
> >> wrote:
> >> > Overview
> >> > =
On 10/10/16 14:16, Eric Blake wrote:
> On 10/09/2016 07:34 PM, Haozhong Zhang wrote:
> > Xen uses this command to get the backend resource, guest SPA and size of
> > NVDIMM devices so as to map them to guest.
> >
> > Signed-off-by: Haozhong Zhang
> > ---
> &
On 10/10/16 17:43, Andrew Cooper wrote:
> On 10/10/16 01:35, Haozhong Zhang wrote:
> > Overview
> >
> > This RFC kernel patch series along with corresponding patch series of
> > Xen, QEMU and ndctl implements Xen vNVDIMM, which can map the host
> >
On 10/09/16 20:45, Dan Williams wrote:
> On Sun, Oct 9, 2016 at 5:35 PM, Haozhong Zhang
> wrote:
> > Overview
> >
> > This RFC kernel patch series along with corresponding patch series of
> > Xen, QEMU and ndctl implements Xen vNVDIMM, which can map the
Add support to create the Xen mode namespace which turns the underlying
pfn device into PFN_MODE_XEN.
Signed-off-by: Haozhong Zhang
---
ndctl/builtin-xaction-namespace.c | 7 ++-
ndctl/lib/libndctl.c | 6 ++
ndctl/libndctl.h.in | 2 ++
ndctl/util/json.c
pfn device in PFN_MODE_XEN reserves an area for Xen hypervisor to place
its own pmem management data structures (i.e. frame table and M2P
table). The reserved area is not used and not mapped by Linux kernel,
and only the data area is mapped.
Signed-off-by: Haozhong Zhang
---
Cc: Dan Williams
Cc
Xen hypervisor does not include NVDIMM driver and relies on the driver
in Dom0 Linux to probe pfn devices in PFN_MODE_XEN. Whenever such a pfn
device is probed, Dom0 Linux reports pages of the entire device, its
reserved area and data area to Xen hypervisor.
Signed-off-by: Haozhong Zhang
---
Cc
Reserve the address space after guest physical memory for the hotplug
memory region which is used by the existing implementation to place
NVDIMM devices.
Signed-off-by: Haozhong Zhang
---
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
Cc: Stefano Stabellini
Cc: Anthony Perard
Build and copy NFIT to guest when QEMU is used as the device model of
Xen. The checksum of NFIT is left blank and will be filled by Xen
hvmloader.
Signed-off-by: Haozhong Zhang
---
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
Cc: Xiao Guangrong
Cc: Paolo Bonzini
Cc: Richard Hen
00/16] Add vNVDIMM support to HVM domains".
Haozhong Zhang (2):
nvdimm: add PFN_MODE_XEN to pfn device for Xen usage
xen, nvdimm: report pfn devices in PFN_MODE_XEN to Xen hypervisor
drivers/nvdimm/namespace_devs.c | 2 ++
drivers/nvdimm/nd.h | 7 +
drivers/nvdimm/
No fw_cfg is created when QEMU is used as the device model of Xen.
Signed-off-by: Haozhong Zhang
---
Cc: Xiao Guangrong
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
---
hw/acpi/nvdimm.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/nvdimm.c
xen_acpi_copy_to_guest() will be used later to copy NVDIMM ACPI to
guest.
Signed-off-by: Haozhong Zhang
---
Cc: Stefano Stabellini
Cc: Anthony Perard
Cc: xen-de...@lists.xensource.com
---
include/hw/xen/xen.h | 6 ++
xen-hvm.c| 180
Build and copy NVDIMM namespace devices to guest when QEMU is used as
the device model of Xen. Only the body of each AML device is built and
copied, Xen hvmloader will build the complete namespace devices from
them and put in SSDT tables.
Signed-off-by: Haozhong Zhang
---
Cc: "Michael S. Ts
,mem-path=$FILENAME,size=$SIZE
-device nvdimm,id=nvdimm1,memdev=mem1
Signed-off-by: Haozhong Zhang
---
Cc: Eduardo Habkost
Cc: Igor Mammedov
---
backends/Makefile.objs | 1 +
backends/hostmem-xen.c | 120 +
backends/hostmem.c | 9
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
Xen uses this command to get the backend resource, guest SPA and size of
NVDIMM devices so as to map them to guest.
Signed-off-by: Haozhong Zhang
---
Cc: Markus Armbruster
Cc: Xiao Guangrong
Cc: "Michael S. Tsirkin"
Cc: Igor Mammedov
Cc: Eric Blake
---
docs/qmp-commands.
We can map host pmem devices or files on pmem devices to guests. This
patch adds support to map files on pmem devices. The implementation
relies on the Linux pmem driver and kernel APIs, so it currently
functions only when libxl is compiled for Linux.
Signed-off-by: Haozhong Zhang
---
Cc: Ian
One guest page is reserved for the device model to place guest ACPI. The
base address and size of the reserved area are passed to the device
model via XenStore keys hvmloader/dm-acpi/{address, length}.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxc/include
When memory-backend-xen is used, the label_data pointer can not be got
via memory_region_get_ram_ptr(). We will use other functions to get
label_data once we introduce NVDIMM label support to Xen.
Signed-off-by: Haozhong Zhang
---
Cc: Xiao Guangrong
Cc: "Michael S. Tsirkin"
Cc: Igo
m device/file '/path/to/pmem#'.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_dm.c | 113 +++-
tools/libxl/libxl_types.idl | 8
tools/libxl/xl_cmdimpl.c| 16 +++
3 files changed,
If any error code is returned when creating a domain, stop the domain
creation.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_create.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl
after ACPI tables built by Xen.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc: Wei Liu
---
tools/firmware/hvmloader/util.c | 12 +++
tools/libacpi/acpi2_0.h | 2 +
tools/libacpi/build.c | 216
libacpi needs to access information placed in XenStore in order to load
ACPI built by the device model.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc: Wei Liu
---
tools/firmware/hvmloader/util.c | 50 +++
tools
ject
memory-backend-file,id=mem1,share,mem-path=/tmp/nvdimm,size=4G \
-device nvdimm,memdev=mem1,id=nv1
4. Take previous steps 1 - 7 in L1.
Haozhong Zhang (16):
01/ x86_64/mm: explicitly specify the location to place the frame table
02/ x86_64/mm: explicitly spe
A reserved area on each pmem region is used to place the M2P table.
However, it's not at the beginning of the pmem region, so we need to
specify the location explicitly when creating the M2P table.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
---
xen/arch/x86/x
Expose the minimal allocation unit and the minimal alignment used by the
memory allocator, so that certain ACPI code (e.g. the AML builder added
later) can get contiguous memory allocated by multiple calls to
acpi_ctxt.mem_ops.alloc().
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc
We can map host pmem devices or files on pmem devices to guests. This
patch adds support to map pmem devices. The implementation relies on the
Linux pmem driver, so it currently functions only when libxl is compiled
for Linux.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
QMP command 'query-nvdimms' is used by libxl to get the backend, the
guest SPA and size of each vNVDIMM device, and then libxl starts mapping
backend to guest for each vNVDIMM device.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
---
tools/libxl/libxl_
to be accessed from Dom0 once it's reported.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Daniel De Graaf
---
xen/arch/x86/Makefile | 1 +
xen/arch/x86/platform_hypercall.c | 7 ++
xen/arch/x86/pmem.c
It is used by libacpi to generate SSDTs from ACPI namespace devices
built by the device model.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc: Wei Liu
---
tools/firmware/hvmloader/Makefile | 3 +-
tools/libacpi/aml_build.c | 254
This callback is used when libacpi needs to in-place access ACPI built
by the device model, whose address is specified in the physical address.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
Cc: Ian Jackson
Cc: Wei Liu
---
tools/firmware/hvmloader/util.c | 6
A reserved area on each pmem region is used to place the frame table.
However, it's not at the beginning of the pmem region, so we need to
specify the location explicitly when extending the frame table.
Signed-off-by: Haozhong Zhang
---
Cc: Jan Beulich
Cc: Andrew Cooper
---
xen/arc
XENMEM_populate_pmemmap is used by toolstack to map given host pmem pages
to given guest pages. Only pages in the data area of a pmem region are
allowed to be mapped to guest.
Signed-off-by: Haozhong Zhang
---
Cc: Ian Jackson
Cc: Wei Liu
Cc: Jan Beulich
Cc: Andrew Cooper
---
tools/libxc
301 - 400 of 693 matches
Mail list logo