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 Gamalm.gamal...@gmail.com --- arch/x86/kvm/vmx.c

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 a...@redhat.com 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.

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 3:10 PM, Avi Kivity a...@redhat.com 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

[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 m.gamal...@gmail.com --- arch/x86/kvm/vmx.c |7 +++ 1 files changed, 7