mbox series

[0/3] arm64: Assorted MMU-on fixes

Message ID 20210224093738.3629662-1-maz@kernel.org (mailing list archive)
Headers show
Series arm64: Assorted MMU-on fixes | expand

Message

Marc Zyngier Feb. 24, 2021, 9:37 a.m. UTC
Guillaume (and his mate the KernelCI bot) recently reported that the
new VHE enablement code lamentably fails when 64k pages are enabled.
And fair enough, the code was broken to the point that it really
should have never booted the first place...

The first patch fixes what amounts to a total brain fart.

The next two patches address a potential issue noted by Will, where we
may be missing some ISBs when invalidating TLBs, right before enabling
the MMU (I've decided the have separate patches for the two instances
so that the first one can be easily backported if required).

I've tested this on my local VHE-capable machine as well as on the FVP
model (with both 4k and 64k pages).

Marc Zyngier (3):
  arm64: VHE: Enable EL2 MMU from the idmap
  arm64: Add missing ISB after invalidating TLB in __primary_switch
  arm64: Add missing ISB after invalidating TLB in enter_vhe

 arch/arm64/kernel/head.S     |  1 +
 arch/arm64/kernel/hyp-stub.S | 40 ++++++++++++++++++++++++------------
 2 files changed, 28 insertions(+), 13 deletions(-)

Comments

Will Deacon Feb. 24, 2021, 12:36 p.m. UTC | #1
On Wed, 24 Feb 2021 09:37:35 +0000, Marc Zyngier wrote:
> Guillaume (and his mate the KernelCI bot) recently reported that the
> new VHE enablement code lamentably fails when 64k pages are enabled.
> And fair enough, the code was broken to the point that it really
> should have never booted the first place...
> 
> The first patch fixes what amounts to a total brain fart.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/3] arm64: VHE: Enable EL2 MMU from the idmap
      https://git.kernel.org/arm64/c/f1b6cff7c98b
[2/3] arm64: Add missing ISB after invalidating TLB in __primary_switch
      https://git.kernel.org/arm64/c/9d41053e8dc1
[3/3] arm64: Add missing ISB after invalidating TLB in enter_vhe
      https://git.kernel.org/arm64/c/430251cc864b

Cheers,