Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Mohammed Gamal
On Tue, May 25, 2010 at 3:10 PM, Avi Kivity wrote: > On 05/25/2010 03:01 PM, Mohammed Gamal wrote: >>> >>> How does the user distinguish between KVM_EXIT_FAIL_ENTRY due to an exit >>> reason with bit 31 set and vmlauch/vmresume failure (vmx->fail set)?  We >>> need separate exit codes (with docume

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Avi Kivity
On 05/25/2010 03:01 PM, Mohammed Gamal wrote: How does the user distinguish between KVM_EXIT_FAIL_ENTRY due to an exit reason with bit 31 set and vmlauch/vmresume failure (vmx->fail set)? We need separate exit codes (with documentation in api.txt). In both cases the vm fails entry, and I

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Mohammed Gamal
On Tue, May 25, 2010 at 2:45 PM, Avi Kivity wrote: > On 05/24/2010 01:01 AM, Mohammed Gamal wrote: >> >> The vmexit handler returns KVM_EXIT_UNKNOWN since there is no handler >> for vmentry failures. This intercepts vmentry failures and returns >> KVM_FAIL_ENTRY to userspace instead. >> >> Signed-

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Avi Kivity
On 05/24/2010 01:01 AM, Mohammed Gamal wrote: The vmexit handler returns KVM_EXIT_UNKNOWN since there is no handler for vmentry failures. This intercepts vmentry failures and returns KVM_FAIL_ENTRY to userspace instead. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/vmx.c |7 +++ 1 fi

[PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-23 Thread Mohammed Gamal
The vmexit handler returns KVM_EXIT_UNKNOWN since there is no handler for vmentry failures. This intercepts vmentry failures and returns KVM_FAIL_ENTRY to userspace instead. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/vmx.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) dif