]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs
authorMarc Zyngier <maz@kernel.org>
Tue, 30 Jul 2019 09:50:38 +0000 (10:50 +0100)
committerMarc Zyngier <maz@kernel.org>
Sat, 26 Oct 2019 09:43:53 +0000 (10:43 +0100)
commitd401be8b712664f92626ea380ab1eef49a7a45c1
tree00fb402c79f8be22175a38bcb6fcd7c072d08a5a
parentd663ac3637468373aa00703578c5d1e2bfe3f48a
arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs

When erratum 1319367 is being worked around, special care must
be taken not to allow the page table walker to populate TLBs
while we have the stage-2 translation enabled (which would otherwise
result in a bizare mix of the host S1 and the guest S2).

We enforce this by setting TCR_EL1.EPD{0,1} before restoring the S2
configuration, and clear the same bits after having disabled S2.

Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/tlb.c