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

2016-12-19 Thread Andrew Cooper
On 19/12/16 03:35, Haozhong Zhang wrote: > >>> +{ >>> +clear_vmcs(vmxon_region, get_vmcs_revid()); >>> + >>> +unsigned long ret = exec_user(vmxon_in_user); >>> +uint8_t err = (ret >> 32) & 0xff; >>> +exinfo_t fault = ret & 0x; >>> + >>> +return handle_vmxinsn_err(__func_

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

2016-12-19 Thread Andrew Cooper
On 19/12/16 03:35, Haozhong Zhang wrote: > 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

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 07/16] vvmx: test vmxon in CPL=3 and out of VMX operation

2016-12-16 Thread Andrew Cooper
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) >VMXERR_FAULT, EXINFO_SYM(U

[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/main.