From patchwork Wed Aug 14 12:34:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 13763442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8EE47C52D7B for ; Wed, 14 Aug 2024 12:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dbmJBPlIuLQn6b7Ti1UH30+86m8dU4ekEx/WNdWP7oE=; b=LTe/DpcQuKHO97PsFvFzyXkNMx ghh0MWbhwgxcs/88f5U/byubwKaz5go5Ob0MgLh9rHmf5HAsCGbOgHcqhOiaNQHcglHf+X1mB2BSH MQwFgz3ZvFJ2GhbCj6x1A+1BGYsUUZfV3LB4av9ECMMk2uY4qTkRdOUDifRhqwtm1d7U4oKcqHh74 bxUwJzqkTUEhwmZEDu1EWlrmKsX0UurnMYnSXj9ypLyASDPlFcjNLwchEoL8rXkzGGFmpYq/oOkHi kD3+RB/e0Qj9LCJfJRb4HgqNYxmRhLKs6aHt7XvWvcH/eiO+HwmKUIR4qMR8N4Gyv/AP33DuyJ0Vs SjNqni4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seDEH-00000006x3J-2KfJ; Wed, 14 Aug 2024 12:35:53 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seDD5-00000006wsV-0n0G for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2024 12:34:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2DBC4CE1931; Wed, 14 Aug 2024 12:34:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8D5AC4AF0D; Wed, 14 Aug 2024 12:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723638876; bh=0lLzlVnV/SkrNnd+QeWCt7iZ7o14ooMiGjV2yyrPM2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VtLxct10ZKkJY0pWU7zuCSgN1dcnsd8uP+UK8cVZD/sjv+gcFdEZvrbP6scD2UlwX aqDuzWc386Cj+WE9NvUdLVnXJQXsKJ8RJ1lv+0bndNQntMQ8SlTYOywDQrnzspzndY 1C49pY10PUXDH9SPvqICXxynKaIfLDkWpwrlAMYx6Kc6IaAkRrrhYm/D0zoFaKntlT J6IjVza1NcECTEh8xtNJ4FtzqCbJq4wkEylJCj+ag8AEEI4Pl6ROQxNcDXxcPL2S/I 28g6cdP2u9DN9KFmX6FM5arhCHVFHfPKplZwWCbMZAstd+f29cfkh7yD1ni1lt9OWU 430E23YGvhKxA== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: Will Deacon , Marc Zyngier , Oliver Upton , Fuad Tabba , kvmarm@lists.linux.dev Subject: [PATCH 1/2] KVM: arm64: Invalidate EL1&0 TLB entries for all VMIDs in nvhe hyp init Date: Wed, 14 Aug 2024 13:34:28 +0100 Message-Id: <20240814123429.20457-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240814123429.20457-1-will@kernel.org> References: <20240814123429.20457-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240814_053439_434458_3A5ACCFD X-CRM114-Status: GOOD ( 11.31 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When initialising the nVHE hypervisor, we invalidate potentially stale TLB entries for the EL1&0 regime using a 'vmalls12e1' invalidation. However, this invalidation operation applies only to the active VMID and therefore we could proceed with stale TLB entries for other VMIDs. Replace the operation with an 'alle1' which applies to all entries for the EL1&0 regime, regardless of the VMID. Cc: Marc Zyngier Cc: Oliver Upton Fixes: 1025c8c0c6ac ("KVM: arm64: Wrap the host with a stage 2") Signed-off-by: Will Deacon --- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S index 07120b37da35..401af1835be6 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S @@ -130,7 +130,7 @@ alternative_else_nop_endif /* Invalidate the stale TLBs from Bootloader */ tlbi alle2 - tlbi vmalls12e1 + tlbi alle1 dsb sy mov_q x0, INIT_SCTLR_EL2_MMU_ON