OSDN Git Service

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)
commit37553941c670c3ad160b25843e6cdcbee2b3c6eb
tree00fb402c79f8be22175a38bcb6fcd7c072d08a5a
parent1d8cd06af548bb1ba29e16eec78c0862e799a731
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