From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbdGEM0X (ORCPT ); Wed, 5 Jul 2017 08:26:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35650 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751743AbdGEM0W (ORCPT ); Wed, 5 Jul 2017 08:26:22 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1A14D4E4D1 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1A14D4E4D1 Subject: Re: [PATCH] KVM: vmx: expose more information for KVM_INTERNAL_ERROR_DELIVERY_EV exits To: David Hildenbrand , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1499251124-35803-1-git-send-email-pbonzini@redhat.com> <2c21b3a2-da45-7f87-776c-ebca59eb4e87@redhat.com> From: Paolo Bonzini Message-ID: <2d1de3af-5c3f-002a-60d4-129a23af265f@redhat.com> Date: Wed, 5 Jul 2017 14:26:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <2c21b3a2-da45-7f87-776c-ebca59eb4e87@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 05 Jul 2017 12:26:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/07/2017 14:25, David Hildenbrand wrote: >> vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV; >> - vcpu->run->internal.ndata = 2; >> + vcpu->run->internal.ndata = 3; >> vcpu->run->internal.data[0] = vectoring_info; >> vcpu->run->internal.data[1] = exit_reason; >> + vcpu->run->internal.data[2] = vcpu->arch.exit_qualification; >> + if (exit_reason == EXIT_REASON_EPT_MISCONFIG) { >> + vcpu->run->internal.ndata++; >> + vcpu->run->internal.data[3] = >> + vmcs_read64(GUEST_PHYSICAL_ADDRESS); > vcpu->run->internal.data[vcpu->run->internal.ndata++] = ... I considered that, but it's very long and the initializations above use numbers. Considering that this is not going to change very often, I ended up with the hard coded 3. Paolo > So we don't have to name the position explicitly. > > Whatever you prefer. > > Reviewed-by: David Hildenbrand >