diff options
author | Marc Zyngier <maz@kernel.org> | 2021-03-10 16:32:53 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-03-18 18:51:56 +0300 |
commit | bc6ddaa67abc9345370b219d07b079d25665f868 (patch) | |
tree | 95f256144cf422eb7b067351f61ee9d556206b6a /arch/arm64/kvm/hyp/nvhe/hyp-init.S | |
parent | 45879a57751d272ced9ed5ccfd28c58e2095ceb7 (diff) | |
download | linux-bc6ddaa67abc9345370b219d07b079d25665f868.tar.xz |
KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM teardown
Instead of doing a RMW on SCTLR_EL2 to disable the MMU, use the
existing define that loads the right set of bits.
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-init.S')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/hyp-init.S | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S index c631e29fb001..4eb584ae13d9 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S @@ -221,9 +221,7 @@ SYM_CODE_START(__kvm_handle_stub_hvc) mov x0, xzr reset: /* Reset kvm back to the hyp stub. */ - mrs x5, sctlr_el2 - mov_q x6, SCTLR_ELx_FLAGS - bic x5, x5, x6 // Clear SCTL_M and etc + mov_q x5, INIT_SCTLR_EL2_MMU_OFF pre_disable_mmu_workaround msr sctlr_el2, x5 isb |