KVM: arm64: Invalidate stage1 TLB entries when AT reports a translation fault
Previously whenever we saw a fault from the AT instructions we would
re-enter the guest so that either the guest would take the stage1 fault,
or KVM would get a stage2 fault which sets HPFAR_EL2.
However, the AT instructions and guest-execution don't necessarily always
see the same value for a translation. The AT instructions may always walk
the page tables, whereas the guest-execution may use a cached entry. See
D5.2.11 "Address translation instructions" of DDI0487F.a.
As we've seen a translation fault (or synchronous exception) from AT,
invalidate the TLB entries for the corresponding address. This ensures
that the guest does not get stuck in this loop until the TLB entry is
Signed-off-by: James Morse <firstname.lastname@example.org>
1 file changed