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.9 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,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 4F5A9C11F64 for ; Thu, 1 Jul 2021 13:19:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1AE8A61410 for ; Thu, 1 Jul 2021 13:19:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AE8A61410 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=bombadil.20210309; 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=gGypceklTfjn86ZS2UL4CpgqK3JAqaEm2oTt1fm0eVo=; b=UPPKg4/fZZTrhr NPTg2eRyJYlifoc66PwZStM0PW3g3Olu/aRqmZVFhhAPdWTLkT1iP2k8NpIkvK6ApFmBa26obn2Wj D7Gm4BJ9G1F9OP+Ih0KkT3gzbOOJMrf2AHDnMdbnQX7v3K8dUf9pmC6WbysAV/XW6udopRU2Vr3Dc 1xJAploZ29i28qQldc+rbLRl+GVHp+sWIsCKKTie7T++gwKl1cuPjFgzcYdCWqInKaEyOnJ6WDiNd fx6eAbVEV6Sy0iIyIJ1d4K4qrwK7UyJFEyQWcrCdg3GPhzNv7zrZssD9WLWEJCMW5yRO08aBYDsD7 e411p3hhTcJkUZcVwNmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lywZa-00HQ0L-Et; Thu, 01 Jul 2021 13:17:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lywZX-00HPza-AL for linux-arm-kernel@lists.infradead.org; Thu, 01 Jul 2021 13:17:40 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD17B61413; Thu, 1 Jul 2021 13:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625145459; bh=cI1lm4mozxs4nIm/KqNPIglmKNb4tX+KV0h6fmFP+R0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R5cjISF1eh/5/Hdbdvebd57RmqEqbIoCtFhWl86CkgdEzBKPr+OL0Fr8r4Ec61kDo FK7jDUp3Mjw5PslrKZVxhD8wFRQsQWe9lB/3F2oXnQELml/J7RlJauoXYH4zoScrRo acm2I1wkol2WzxF99j2mZ/vHSOJDSia0orfn1cshIADREzPPRfKI0Z3G9zaoecLU2h Fs58SRA/m3xEDJbVgxsYRAMs8MYS+RFNQILw+87y5S9p3NF8at+WPyNPaPjljFWlbb ocr5c8SkjGyVFnrX17tTY466zjDovMnMJq3O6DyVPqbxBLi8T9LKK+7b4ZRQxp/O8E JPDZDqgo1uU2Q== Date: Thu, 1 Jul 2021 14:17:33 +0100 From: Will Deacon To: Fuad Tabba Cc: kvmarm@lists.cs.columbia.edu, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, pbonzini@redhat.com, drjones@redhat.com, qperret@google.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com Subject: Re: [PATCH v2 05/13] KVM: arm64: Restore mdcr_el2 from vcpu Message-ID: <20210701131733.GE9757@willie-the-truck> References: <20210615133950.693489-1-tabba@google.com> <20210615133950.693489-6-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210615133950.693489-6-tabba@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210701_061739_423199_BA97D3FB X-CRM114-Status: GOOD ( 18.51 ) 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, Jun 15, 2021 at 02:39:42PM +0100, Fuad Tabba wrote: > On deactivating traps, restore the value of mdcr_el2 from the > vcpu context, rather than directly reading the hardware register. > Currently, the two values are the same, i.e., the hardware > register and the vcpu one. A future patch will be changing the > value of mdcr_el2 on activating traps, and this ensures that its > value will be restored. > > No functional change intended. > > Signed-off-by: Fuad Tabba > --- > arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/switch.c b/arch/arm64/kvm/hyp/nvhe/switch.c > index f7af9688c1f7..430b5bae8761 100644 > --- a/arch/arm64/kvm/hyp/nvhe/switch.c > +++ b/arch/arm64/kvm/hyp/nvhe/switch.c > @@ -73,7 +73,7 @@ static void __deactivate_traps(struct kvm_vcpu *vcpu) > > ___deactivate_traps(vcpu); > > - mdcr_el2 = read_sysreg(mdcr_el2); > + mdcr_el2 = vcpu->arch.mdcr_el2; Do you need to change the VHE code too? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel