]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 6 Dec 2018 17:31:19 +0000 (17:31 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Dec 2018 11:54:37 +0000 (11:54 +0000)
commit6b1c22445765c5d740fca270d58ff91cef3cd363
tree90736c01cfc0860f68da3c714d50b80a7c70eb03
parentf11bd5030d4f1983e167d654e8455adaea4ba160
arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible

Contrary to the non-VHE version of the TLB invalidation helpers, the VHE
code  has interrupts enabled, meaning that we can take an interrupt in
the middle of such a sequence, and start running something else with
HCR_EL2.TGE cleared.

That's really not a good idea.

Take the heavy-handed option and disable interrupts in
__tlb_switch_to_guest_vhe, restoring them in __tlb_switch_to_host_vhe.
The latter also gain an ISB in order to make sure that TGE really has
taken effect.

Cc: stable@vger.kernel.org
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kvm/hyp/tlb.c