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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 7C7C9C433DB for ; Tue, 16 Feb 2021 22:06:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4391D64E76 for ; Tue, 16 Feb 2021 22:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbhBPWG1 (ORCPT ); Tue, 16 Feb 2021 17:06:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:48682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhBPWG0 (ORCPT ); Tue, 16 Feb 2021 17:06:26 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DF8A64DDA; Tue, 16 Feb 2021 22:05:46 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lC8TW-00EVA0-Cw; Tue, 16 Feb 2021 22:05:42 +0000 Date: Tue, 16 Feb 2021 22:05:33 +0000 Message-ID: <87tuqbpt1u.wl-maz@kernel.org> From: Marc Zyngier To: Andre Przywara Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Christoffer Dall , Jintack Lim , Alexandru Elisei , James Morse , Julien Thierry , Suzuki K Poulose , kernel-team@android.com, Jintack Lim Subject: Re: [PATCH v3 09/66] KVM: arm64: nv: Support virtual EL2 exceptions In-Reply-To: <20210129180539.2c508b6e@slackpad.fritz.box> References: <20201210160002.1407373-1-maz@kernel.org> <20201210160002.1407373-10-maz@kernel.org> <20210129180539.2c508b6e@slackpad.fritz.box> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@arm.com, jintack@cs.columbia.edu, alexandru.elisei@arm.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com, jintack.lim@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 29 Jan 2021 18:05:39 +0000, Andre Przywara wrote: > > On Thu, 10 Dec 2020 15:59:05 +0000 > Marc Zyngier wrote: [...] > > diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c > > index b47df73e98d7..530562eb09fd 100644 > > --- a/arch/arm64/kvm/inject_fault.c > > +++ b/arch/arm64/kvm/inject_fault.c > > @@ -14,17 +14,50 @@ > > #include > > #include > > > > +static void pend_sync_exception(struct kvm_vcpu *vcpu) > > +{ > > + vcpu->arch.flags |= (KVM_ARM64_EXCEPT_AA64_ELx_SYNC | > > + KVM_ARM64_PENDING_EXCEPTION); > > + > > + /* If not nesting, EL1 is the only possible exception target */ > > + if (likely(!nested_virt_in_use(vcpu))) { > > This breaks compilation for the next 14 patches, because > nested_virt_in_use() is unknown here. Patch 23/66 fixes this by adding > kvm_nested.h to kvm_emulate.h. Indeed, well caught. > Shall we do this already in this patch here, or pull in kvm_nested.h in > every C file we use nested_virt_in_use(), like exception.c above? I've just added kvm_nested.h in the two places that were required at this stage (and verified that it all bisects correctly now). Thanks, M. -- Without deviation from the norm, progress is not possible.