Re: [Xen-devel] [XTF PATCH 14/16] vvmx: test vmxon in VMX root w/ CPL = 3 and w/o current VMCS

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 08/16] vvmx: test vmxon with invalidly wide VMXON region address

2016-12-18 Thread Haozhong Zhang
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 ) +

Re: [Xen-devel] [XTF PATCH 07/16] vvmx: test vmxon in CPL=3 and out of VMX operation

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 06/16] vvmx: test vmxon with CR4.VMXE cleared

2016-12-18 Thread Haozhong Zhang
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"

Re: [Xen-devel] [XTF PATCH 05/16] vvmx: add a general error handler for VMX instructions

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [licensing] was: [XTF PATCH 04/16] vvmx: add C wrappers of vmxon/vmread/vmptrld

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 04/16] vvmx: add C wrappers of vmxon/vmread/vmptrld

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 03/16] vvmx: test whether MSR_IA32_VMX_BASIC is set correctly

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 02/16] vvmx: test whether MSR_IA32_FEATURE_CONTROL is set correctly

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 01/16] vvmx: test whether VMX feature is present in CPUID

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [XTF PATCH 00/16] Add test cases for nested vmxon

2016-12-18 Thread Haozhong Zhang
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).

[Xen-devel] [PATCH] vvmx: fix the wrong address width in c/s 08fac63

2016-12-18 Thread Haozhong Zhang
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

Re: [Xen-devel] [PATCH v2 3/4] vvmx: check the operand of L1 vmxon

2016-12-18 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 11/16] vvmx: test vmxon with bit 31 of VMCS revision ID set

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 14/16] vvmx: test vmxon in VMX root w/ CPL = 3 and w/o current VMCS

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 13/16] vvmx: test vmxon in VMX root w/ CPL = 0 and w/o current VMCS

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 05/16] vvmx: add a general error handler for VMX instructions

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 12/16] vvmx: test the correct vmxon

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 16/16] vvmx: test vmxon in VMX root w/ CPL = 3 and w/ current VMCS

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 15/16] vvmx: test vmxon in VMX root w/ CPL = 0 and w/ current VMCS

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 10/16] vvmx: test vmxon with mismatched VMCS revision ID

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 08/16] vvmx: test vmxon with invalidly wide VMXON region address

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 06/16] vvmx: test vmxon with CR4.VMXE cleared

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 04/16] vvmx: add C wrappers of vmxon/vmread/vmptrld

2016-12-16 Thread Haozhong Zhang
. 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

[Xen-devel] [XTF PATCH 00/16] Add test cases for nested vmxon

2016-12-16 Thread Haozhong Zhang
. * 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

[Xen-devel] [XTF PATCH 09/16] vvmx: test vmxon with unaligned VMXON region address

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 02/16] vvmx: test whether MSR_IA32_FEATURE_CONTROL is set correctly

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 07/16] vvmx: test vmxon in CPL=3 and out of VMX operation

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 03/16] vvmx: test whether MSR_IA32_VMX_BASIC is set correctly

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [XTF PATCH 01/16] vvmx: test whether VMX feature is present in CPUID

2016-12-16 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v3] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-15 Thread Haozhong Zhang
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

Re: [Xen-devel] [PATCH v2] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-15 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v2] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-15 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC PATCH] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-15 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC PATCH] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-14 Thread Haozhong Zhang
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

[Xen-devel] [RFC PATCH] vvmx: replace vmreturn() by vmsucceed() and vmfail*()

2016-12-14 Thread Haozhong Zhang
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]

Re: [Xen-devel] [PATCH v2 4/4] nestedhvm: replace VMCX_EADDR by INVALID_PADDR

2016-12-14 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v2 3/4] vvmx: check the operand of L1 vmxon

2016-12-14 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v2 2/4] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation

2016-12-14 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v2 0/4] vvmx: fix L1 vmxon

2016-12-14 Thread Haozhong Zhang
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

[Xen-devel] [PATCH v2 4/4] nestedhvm: replace VMCX_EADDR by INVALID_PADDR

2016-12-14 Thread Haozhong Zhang
... 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

[Xen-devel] [PATCH v2 1/4] vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address

2016-12-14 Thread Haozhong Zhang
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

Re: [Xen-devel] [PATCH 1/3] vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address

2016-12-13 Thread Haozhong Zhang
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

Re: [Xen-devel] [PATCH 2/3] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation

2016-12-13 Thread Haozhong Zhang
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

[Xen-devel] [PATCH 1/3] vvmx: set vmxon_region_pa of vcpu out of VMX operation to an invalid address

2016-12-13 Thread Haozhong Zhang
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

[Xen-devel] [PATCH 2/3] vvmx: return VMfail to L1 if L1 vmxon is executed in VMX operation

2016-12-13 Thread Haozhong Zhang
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

[Xen-devel] [PATCH 0/3] vvmx: fix L1 vmxon

2016-12-13 Thread Haozhong Zhang
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

[Xen-devel] [PATCH 3/3] vvmx: check the operand of L1 vmxon

2016-12-13 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-12-12 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-12-12 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 02/16] x86_64/mm: explicitly specify the location to place the M2P table

2016-12-12 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 05/16] xen/x86: release pmem pages at domain destroy

2016-12-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 04/16] xen/x86: add XENMEM_populate_pmemmap to map host pmem pages to guest

2016-12-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-12-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 02/16] x86_64/mm: explicitly specify the location to place the M2P table

2016-12-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 01/16] x86_64/mm: explicitly specify the location to place the frame table

2016-12-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC XEN PATCH 00/16] Add vNVDIMM support to HVM domains

2016-10-24 Thread Haozhong Zhang
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 -

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-20 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-20 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-14 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-13 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-13 Thread Haozhong Zhang
+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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-13 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-12 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-12 Thread Haozhong Zhang
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

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

2016-10-11 Thread Haozhong Zhang
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 > >> &

Re: [Xen-devel] `xl create` hang on skylake desktop

2016-10-11 Thread Haozhong Zhang
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

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-11 Thread Haozhong Zhang
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 > >> > =

Re: [Xen-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

2016-10-10 Thread Haozhong Zhang
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 > > --- > &

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-10 Thread 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 > >

Re: [Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC NDCTL PATCH] ndctl: add support for Xen mode namespace

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC KERNEL PATCH 1/2] nvdimm: add PFN_MODE_XEN to pfn device for Xen usage

2016-10-09 Thread Haozhong Zhang
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-devel] [RFC KERNEL PATCH 2/2] xen, nvdimm: report pfn devices in PFN_MODE_XEN to Xen hypervisor

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC QEMU PATCH 7/8] xen-hvm: create hotplug memory region for HVM guest

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC QEMU PATCH 4/8] nvdimm acpi: build and copy NFIT to guest on Xen

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC KERNEL PATCH 0/2] Add Dom0 NVDIMM support for Xen

2016-10-09 Thread Haozhong Zhang
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/

[Xen-devel] [RFC QEMU PATCH 3/8] nvdimm acpi: do not use fw_cfg on Xen

2016-10-09 Thread Haozhong Zhang
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-devel] [RFC QEMU PATCH 2/8] xen-hvm: add a function to copy ACPI to guest

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC QEMU PATCH 5/8] nvdimm acpi: build and copy NVDIMM namespace devices to guest on Xen

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC QEMU PATCH 6/8] hostmem: add a host memory backend for Xen

2016-10-09 Thread Haozhong Zhang
,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

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

2016-10-09 Thread Haozhong Zhang
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-devel] [RFC QEMU PATCH 8/8] qmp: add a qmp command 'query-nvdimms' to get plugged NVDIMM devices

2016-10-09 Thread Haozhong Zhang
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.

[Xen-devel] [RFC XEN PATCH 14/16] tools/libxl: add support to map files on pmem devices to guests

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 06/16] tools: reserve guest memory for ACPI from device model

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC QEMU PATCH 1/8] nvdimm: do not initialize label_data if label_size is zero

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 12/16] tools/libxl: build qemu options from xl vNVDIMM configs

2016-10-09 Thread Haozhong Zhang
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,

[Xen-devel] [RFC XEN PATCH 15/16] tools/libxl: handle return code of libxl__qmp_initializations()

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 11/16] tools/libacpi: load ACPI built by the device model

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 09/16] tools/libacpi: add callbacks to access XenStore

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 00/16] Add vNVDIMM support to HVM domains

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 02/16] x86_64/mm: explicitly specify the location to place the M2P table

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 08/16] tools/libacpi: expose details of memory allocation callback

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 13/16] tools/libxl: add support to map host pmem device to guests

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 16/16] tools/libxl: initiate pmem mapping via qmp callback

2016-10-09 Thread Haozhong Zhang
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_

[Xen-devel] [RFC XEN PATCH 03/16] xen/x86: add a hypercall XENPF_pmem_add to report host pmem regions

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 10/16] tools/libacpi: add a simple AML builder

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 07/16] tools/libacpi: add callback acpi_ctxt.p2v to get a pointer from physical address

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 01/16] x86_64/mm: explicitly specify the location to place the frame table

2016-10-09 Thread Haozhong Zhang
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

[Xen-devel] [RFC XEN PATCH 04/16] xen/x86: add XENMEM_populate_pmemmap to map host pmem pages to guest

2016-10-09 Thread Haozhong Zhang
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

<    1   2   3   4   5   6   7   >