From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753343AbbDGLRK (ORCPT ); Tue, 7 Apr 2015 07:17:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59069 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751528AbbDGLRH (ORCPT ); Tue, 7 Apr 2015 07:17:07 -0400 Message-ID: <5523BCA4.4070601@redhat.com> Date: Tue, 07 Apr 2015 13:16:52 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org CC: kvm@vger.kernel.org Subject: Re: [PATCH] KVM: vmx: pass error code with internal error #2 References: <1428001865-32280-1-git-send-email-rkrcmar@redhat.com> In-Reply-To: <1428001865-32280-1-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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ář > --- > 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