Message ID | 20210224093738.3629662-4-maz@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: Assorted MMU-on fixes | expand |
On Wed, Feb 24, 2021 at 09:37:38AM +0000, Marc Zyngier wrote: > 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 enter_vhe(), just in case. > > Fixes: f359182291c7 ("arm64: Provide an 'upgrade to VHE' stub hypercall") > Suggested-by: Will Deacon <will@kernel.org> > Signed-off-by: Marc Zyngier <maz@kernel.org> Same comment as for patch 2; with the commit message similarly updated: Acked-by: Mark Rutland <mark.rutland@arm.com> Thanks, Mark. > --- > arch/arm64/kernel/hyp-stub.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S > index ae56787ea7c1..5eccbd62fec8 100644 > --- a/arch/arm64/kernel/hyp-stub.S > +++ b/arch/arm64/kernel/hyp-stub.S > @@ -152,6 +152,7 @@ SYM_CODE_START_LOCAL(enter_vhe) > // Invalidate TLBs before enabling the MMU > tlbi vmalle1 > dsb nsh > + isb > > // Enable the EL2 S1 MMU, as set up from EL1 > mrs_s x0, SYS_SCTLR_EL12 > -- > 2.29.2 >
diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S index ae56787ea7c1..5eccbd62fec8 100644 --- a/arch/arm64/kernel/hyp-stub.S +++ b/arch/arm64/kernel/hyp-stub.S @@ -152,6 +152,7 @@ SYM_CODE_START_LOCAL(enter_vhe) // Invalidate TLBs before enabling the MMU tlbi vmalle1 dsb nsh + isb // Enable the EL2 S1 MMU, as set up from EL1 mrs_s x0, SYS_SCTLR_EL12
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 enter_vhe(), just in case. Fixes: f359182291c7 ("arm64: Provide an 'upgrade to VHE' stub hypercall") Suggested-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> --- arch/arm64/kernel/hyp-stub.S | 1 + 1 file changed, 1 insertion(+)