All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Will Deacon <will@kernel.org>,
	Guillaume Tucker <guillaume.tucker@collabora.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	kernel-team@android.com, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 2/3] arm64: Add missing ISB after invalidating TLB in __primary_switch
Date: Wed, 24 Feb 2021 09:37:37 +0000	[thread overview]
Message-ID: <20210224093738.3629662-3-maz@kernel.org> (raw)
In-Reply-To: <20210224093738.3629662-1-maz@kernel.org>

Although there has been a bit of back and forth on the subject,
it appears that invalidating TLBs requires an ISB instruction
after the TLBI/DSB sequence, as documented in d0b7a302d58a
("Revert "arm64: Remove unnecessary ISBs from set_{pte,pmd,pud}"").

Add the missing ISB in __primary_switch, just in case.

Fixes: 3c5e9f238bc4 ("arm64: head.S: move KASLR processing out of __enable_mmu()")
Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 arch/arm64/kernel/head.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 1e30b5550d2a..66b0e0b66e31 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -837,6 +837,7 @@ SYM_FUNC_START_LOCAL(__primary_switch)
 
 	tlbi	vmalle1				// Remove any stale TLB entries
 	dsb	nsh
+	isb
 
 	set_sctlr_el1	x19			// re-enable the MMU
 
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-02-24  9:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  9:37 [PATCH 0/3] arm64: Assorted MMU-on fixes Marc Zyngier
2021-02-24  9:37 ` [PATCH 1/3] arm64: VHE: Enable EL2 MMU from the idmap Marc Zyngier
2021-02-24  9:37 ` Marc Zyngier [this message]
2021-02-24 11:06   ` [PATCH 2/3] arm64: Add missing ISB after invalidating TLB in __primary_switch Mark Rutland
2021-02-24 11:16     ` Will Deacon
2021-02-24 11:45       ` Mark Rutland
2021-02-24 12:06         ` Will Deacon
2021-02-24  9:37 ` [PATCH 3/3] arm64: Add missing ISB after invalidating TLB in enter_vhe Marc Zyngier
2021-02-24 11:12   ` Mark Rutland
2021-02-24 12:36 ` [PATCH 0/3] arm64: Assorted MMU-on fixes Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210224093738.3629662-3-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.