From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9EB2C433DB for ; Thu, 4 Mar 2021 19:40:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5F7764F60 for ; Thu, 4 Mar 2021 19:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235593AbhCDTkD (ORCPT ); Thu, 4 Mar 2021 14:40:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:45574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbhCDTjx (ORCPT ); Thu, 4 Mar 2021 14:39:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C5D464F60; Thu, 4 Mar 2021 19:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614886753; bh=aI8BOthiv/XoVAjzXsTcAVCGuPJu3RX8bBEOeiMMP9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vp0R4MR5XPFCy4evMVY9Vhpn4ovFcqqoWie42ktox8X+fmC5jgR2XEXc0BeOWRA6H E8wvUpqIm13NOUVJr2L98dKT7kw7SEOx7/N/EECcqV180dE8pNuIR/ZiwapF2Yl5zk IEg+uIjwUjn2SyFAd4ABLrOb7ZqYEguwYk9RHqXGZ5+o2DNNPYclFMVZFhH8q0qGRc s/VE2a55ukN3Khe20GuGf2NADpo5cS2lI6HSClJLYGYeJyb1BgerxfT58ynWBYqZB4 ZsouCxcFwBO2R2M+9nlJgsHJh4oT2VuNJIp92oatIqzDM/hlT4OmFCdBNuOosI+4i+ Guz9+bCddyRww== Date: Thu, 4 Mar 2021 19:39:07 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org Subject: Re: [PATCH v3 22/32] KVM: arm64: Refactor __populate_fault_info() Message-ID: <20210304193906.GB21950@willie-the-truck> References: <20210302150002.3685113-1-qperret@google.com> <20210302150002.3685113-23-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302150002.3685113-23-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 02:59:52PM +0000, Quentin Perret wrote: > Refactor __populate_fault_info() to introduce __get_fault_info() which > will be used once the host is wrapped in a stage 2. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/include/hyp/switch.h | 37 ++++++++++++++----------- > 1 file changed, 21 insertions(+), 16 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h > index 6c1f51f25eb3..1f017c9851bb 100644 > --- a/arch/arm64/kvm/hyp/include/hyp/switch.h > +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h > @@ -160,19 +160,9 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) > return true; > } > > -static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault) > { > - u8 ec; > - u64 esr; > - u64 hpfar, far; > - > - esr = vcpu->arch.fault.esr_el2; > - ec = ESR_ELx_EC(esr); > - > - if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > - return true; > - > - far = read_sysreg_el2(SYS_FAR); > + fault->far_el2 = read_sysreg_el2(SYS_FAR); > > /* > * The HPFAR can be invalid if the stage 2 fault did not > @@ -188,14 +178,29 @@ static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > if (!(esr & ESR_ELx_S1PTW) && > (cpus_have_final_cap(ARM64_WORKAROUND_834220) || > (esr & ESR_ELx_FSC_TYPE) == FSC_PERM)) { > - if (!__translate_far_to_hpfar(far, &hpfar)) > + if (!__translate_far_to_hpfar(fault->far_el2, &fault->hpfar_el2)) > return false; > } else { > - hpfar = read_sysreg(hpfar_el2); > + fault->hpfar_el2 = read_sysreg(hpfar_el2); > } > > - vcpu->arch.fault.far_el2 = far; > - vcpu->arch.fault.hpfar_el2 = hpfar; > + return true; > +} > + > +static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +{ > + u8 ec; > + u64 esr; > + > + esr = vcpu->arch.fault.esr_el2; > + ec = ESR_ELx_EC(esr); > + > + if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > + return true; > + > + if (!__get_fault_info(esr, &vcpu->arch.fault)) > + return false; > + > return true; Just return __get_fault_info(esr, &vcpu->arch.fault); here. With that: Acked-by: Will Deacon Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6986DC433DB for ; Thu, 4 Mar 2021 19:39:18 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id CECCC64F64 for ; Thu, 4 Mar 2021 19:39:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CECCC64F64 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 13A1C4B65D; Thu, 4 Mar 2021 14:39:17 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JfyldAShB+sw; Thu, 4 Mar 2021 14:39:15 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E04914B664; Thu, 4 Mar 2021 14:39:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id EFFFF4B65F for ; Thu, 4 Mar 2021 14:39:14 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uvz8gK8RN2tC for ; Thu, 4 Mar 2021 14:39:14 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 07E444B65D for ; Thu, 4 Mar 2021 14:39:14 -0500 (EST) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C5D464F60; Thu, 4 Mar 2021 19:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614886753; bh=aI8BOthiv/XoVAjzXsTcAVCGuPJu3RX8bBEOeiMMP9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vp0R4MR5XPFCy4evMVY9Vhpn4ovFcqqoWie42ktox8X+fmC5jgR2XEXc0BeOWRA6H E8wvUpqIm13NOUVJr2L98dKT7kw7SEOx7/N/EECcqV180dE8pNuIR/ZiwapF2Yl5zk IEg+uIjwUjn2SyFAd4ABLrOb7ZqYEguwYk9RHqXGZ5+o2DNNPYclFMVZFhH8q0qGRc s/VE2a55ukN3Khe20GuGf2NADpo5cS2lI6HSClJLYGYeJyb1BgerxfT58ynWBYqZB4 ZsouCxcFwBO2R2M+9nlJgsHJh4oT2VuNJIp92oatIqzDM/hlT4OmFCdBNuOosI+4i+ Guz9+bCddyRww== Date: Thu, 4 Mar 2021 19:39:07 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [PATCH v3 22/32] KVM: arm64: Refactor __populate_fault_info() Message-ID: <20210304193906.GB21950@willie-the-truck> References: <20210302150002.3685113-1-qperret@google.com> <20210302150002.3685113-23-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302150002.3685113-23-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: android-kvm@google.com, catalin.marinas@arm.com, mate.toth-pal@arm.com, seanjc@google.com, tabba@google.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Tue, Mar 02, 2021 at 02:59:52PM +0000, Quentin Perret wrote: > Refactor __populate_fault_info() to introduce __get_fault_info() which > will be used once the host is wrapped in a stage 2. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/include/hyp/switch.h | 37 ++++++++++++++----------- > 1 file changed, 21 insertions(+), 16 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h > index 6c1f51f25eb3..1f017c9851bb 100644 > --- a/arch/arm64/kvm/hyp/include/hyp/switch.h > +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h > @@ -160,19 +160,9 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) > return true; > } > > -static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault) > { > - u8 ec; > - u64 esr; > - u64 hpfar, far; > - > - esr = vcpu->arch.fault.esr_el2; > - ec = ESR_ELx_EC(esr); > - > - if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > - return true; > - > - far = read_sysreg_el2(SYS_FAR); > + fault->far_el2 = read_sysreg_el2(SYS_FAR); > > /* > * The HPFAR can be invalid if the stage 2 fault did not > @@ -188,14 +178,29 @@ static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > if (!(esr & ESR_ELx_S1PTW) && > (cpus_have_final_cap(ARM64_WORKAROUND_834220) || > (esr & ESR_ELx_FSC_TYPE) == FSC_PERM)) { > - if (!__translate_far_to_hpfar(far, &hpfar)) > + if (!__translate_far_to_hpfar(fault->far_el2, &fault->hpfar_el2)) > return false; > } else { > - hpfar = read_sysreg(hpfar_el2); > + fault->hpfar_el2 = read_sysreg(hpfar_el2); > } > > - vcpu->arch.fault.far_el2 = far; > - vcpu->arch.fault.hpfar_el2 = hpfar; > + return true; > +} > + > +static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +{ > + u8 ec; > + u64 esr; > + > + esr = vcpu->arch.fault.esr_el2; > + ec = ESR_ELx_EC(esr); > + > + if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > + return true; > + > + if (!__get_fault_info(esr, &vcpu->arch.fault)) > + return false; > + > return true; Just return __get_fault_info(esr, &vcpu->arch.fault); here. With that: Acked-by: Will Deacon Will _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01528C433DB for ; Thu, 4 Mar 2021 19:41:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A44864F60 for ; Thu, 4 Mar 2021 19:41:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A44864F60 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+uhd7tfEYTvxQ+7xyzgEApO68ZTwDTqXHnWGTnVqPOI=; b=Mz+OwZgO+C1WzFyl0D+L7ulRp Zb3DLcxugsgzKSs4I1aX2/+ybemFYNiMBZ1ZL27RBqQ+g83NF+3rekBuEAvwYwBvmBcYcNo7bFc9o /6JYSBMWgMqhEWpUfh14n+KroGFj0uVSRkJKYTjOl0/0eG6CnNrmasuEFjIUXmkkwD8UrjeAsKfL5 01RfzN2jTJY360+seTIGxO90zioRfyAXpODy2D3Gf20ixNCvRv9u4MLMX1HxmCyG/PBSBZbrovoBM wG6kpuaH7KBbg/u8QGVAiM/WPnLY7QfxwNeuoaRgQ2+PUWX22bllYnYvoJ+gSYi2ktdBnGwIaf4mZ JWZ8UKjnQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHtog-009nt4-2D; Thu, 04 Mar 2021 19:39:22 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHtoY-009nr2-Sf for linux-arm-kernel@lists.infradead.org; Thu, 04 Mar 2021 19:39:17 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C5D464F60; Thu, 4 Mar 2021 19:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614886753; bh=aI8BOthiv/XoVAjzXsTcAVCGuPJu3RX8bBEOeiMMP9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vp0R4MR5XPFCy4evMVY9Vhpn4ovFcqqoWie42ktox8X+fmC5jgR2XEXc0BeOWRA6H E8wvUpqIm13NOUVJr2L98dKT7kw7SEOx7/N/EECcqV180dE8pNuIR/ZiwapF2Yl5zk IEg+uIjwUjn2SyFAd4ABLrOb7ZqYEguwYk9RHqXGZ5+o2DNNPYclFMVZFhH8q0qGRc s/VE2a55ukN3Khe20GuGf2NADpo5cS2lI6HSClJLYGYeJyb1BgerxfT58ynWBYqZB4 ZsouCxcFwBO2R2M+9nlJgsHJh4oT2VuNJIp92oatIqzDM/hlT4OmFCdBNuOosI+4i+ Guz9+bCddyRww== Date: Thu, 4 Mar 2021 19:39:07 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org Subject: Re: [PATCH v3 22/32] KVM: arm64: Refactor __populate_fault_info() Message-ID: <20210304193906.GB21950@willie-the-truck> References: <20210302150002.3685113-1-qperret@google.com> <20210302150002.3685113-23-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302150002.3685113-23-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 02, 2021 at 02:59:52PM +0000, Quentin Perret wrote: > Refactor __populate_fault_info() to introduce __get_fault_info() which > will be used once the host is wrapped in a stage 2. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/include/hyp/switch.h | 37 ++++++++++++++----------- > 1 file changed, 21 insertions(+), 16 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h > index 6c1f51f25eb3..1f017c9851bb 100644 > --- a/arch/arm64/kvm/hyp/include/hyp/switch.h > +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h > @@ -160,19 +160,9 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) > return true; > } > > -static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +static inline bool __get_fault_info(u64 esr, struct kvm_vcpu_fault_info *fault) > { > - u8 ec; > - u64 esr; > - u64 hpfar, far; > - > - esr = vcpu->arch.fault.esr_el2; > - ec = ESR_ELx_EC(esr); > - > - if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > - return true; > - > - far = read_sysreg_el2(SYS_FAR); > + fault->far_el2 = read_sysreg_el2(SYS_FAR); > > /* > * The HPFAR can be invalid if the stage 2 fault did not > @@ -188,14 +178,29 @@ static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > if (!(esr & ESR_ELx_S1PTW) && > (cpus_have_final_cap(ARM64_WORKAROUND_834220) || > (esr & ESR_ELx_FSC_TYPE) == FSC_PERM)) { > - if (!__translate_far_to_hpfar(far, &hpfar)) > + if (!__translate_far_to_hpfar(fault->far_el2, &fault->hpfar_el2)) > return false; > } else { > - hpfar = read_sysreg(hpfar_el2); > + fault->hpfar_el2 = read_sysreg(hpfar_el2); > } > > - vcpu->arch.fault.far_el2 = far; > - vcpu->arch.fault.hpfar_el2 = hpfar; > + return true; > +} > + > +static inline bool __populate_fault_info(struct kvm_vcpu *vcpu) > +{ > + u8 ec; > + u64 esr; > + > + esr = vcpu->arch.fault.esr_el2; > + ec = ESR_ELx_EC(esr); > + > + if (ec != ESR_ELx_EC_DABT_LOW && ec != ESR_ELx_EC_IABT_LOW) > + return true; > + > + if (!__get_fault_info(esr, &vcpu->arch.fault)) > + return false; > + > return true; Just return __get_fault_info(esr, &vcpu->arch.fault); here. With that: Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel