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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:38:41 +0000 (17:38 +0100)
commit07cbcfc33fc96ed3a4ee02ed81d2989bef7ec084
tree9a6a59b3bed09ca09eb5decdf7b438d0d78e1153
parentedcf33b155fe65c4cf2f94759a0da35fe14e5c33
arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible

commit c987876a80e7bcb98a839f10dca9ce7fda4feced upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kvm/hyp/tlb.c