public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: vmx: pass error code with internal error #2
@ 2015-04-02 19:11 Radim Krčmář
  2015-04-07 11:16 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Radim Krčmář @ 2015-04-02 19:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: kvm, Paolo Bonzini

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;
 	}
 
-- 
2.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: vmx: pass error code with internal error #2
  2015-04-02 19:11 [PATCH] KVM: vmx: pass error code with internal error #2 Radim Krčmář
@ 2015-04-07 11:16 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-04-07 11:16 UTC (permalink / raw)
  To: Radim Krčmář, linux-kernel; +Cc: kvm



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-07 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 19:11 [PATCH] KVM: vmx: pass error code with internal error #2 Radim Krčmář
2015-04-07 11:16 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox