diff mbox

KVM: vmx: pass error code with internal error #2

Message ID 1428001865-32280-1-git-send-email-rkrcmar@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Radim Krčmář April 2, 2015, 7:11 p.m. UTC
Exposing the on-stack error code with internal error is cheap and
potentially useful.

Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
---
 arch/x86/kvm/vmx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Paolo Bonzini April 7, 2015, 11:16 a.m. UTC | #1
On 02/04/2015 21:11, Radim Kr?má? wrote:
> Exposing the on-stack error code with internal error is cheap and
> potentially useful.
> 
> Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
> ---
>  arch/x86/kvm/vmx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 0caaf56eb459..cfbd737afcd1 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -5089,9 +5089,10 @@ static int handle_exception(struct kvm_vcpu *vcpu)
>  	    !(is_page_fault(intr_info) && !(error_code & PFERR_RSVD_MASK))) {
>  		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
>  		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_SIMUL_EX;
> -		vcpu->run->internal.ndata = 2;
> +		vcpu->run->internal.ndata = 3;
>  		vcpu->run->internal.data[0] = vect_info;
>  		vcpu->run->internal.data[1] = intr_info;
> +		vcpu->run->internal.data[2] = error_code;
>  		return 0;
>  	}
>  
> 

Applied, thanks.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0caaf56eb459..cfbd737afcd1 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -5089,9 +5089,10 @@  static int handle_exception(struct kvm_vcpu *vcpu)
 	    !(is_page_fault(intr_info) && !(error_code & PFERR_RSVD_MASK))) {
 		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_SIMUL_EX;
-		vcpu->run->internal.ndata = 2;
+		vcpu->run->internal.ndata = 3;
 		vcpu->run->internal.data[0] = vect_info;
 		vcpu->run->internal.data[1] = intr_info;
+		vcpu->run->internal.data[2] = error_code;
 		return 0;
 	}