]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit885aaafce1dbcbe45f9fa9d4c1b4b3783d7b7dcd
tree2ff6e9a2b12f20e75e63ac37c66d3433844a2423
parent6f8aef6996455aa054be0d539bc390c2888550e1
arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible

BugLink: https://bugs.launchpad.net/bugs/1837257
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/kvm/hyp/tlb.c