arm64: KVM: Add workaround for Cortex-A57 erratum 834220
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 16 Nov 2015 10:28:18 +0000 (10:28 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 24 Nov 2015 16:58:14 +0000 (17:58 +0100)
commit498cd5c32be6e32bc0f8efcad48ab094bb2bfdf3
treea82a2907c46684fcb8d15909de334dc48459a22e
parentc0f0963464c24e034b858441205455bf2a5d93ad
arm64: KVM: Add workaround for Cortex-A57 erratum 834220

Cortex-A57 parts up to r1p2 can misreport Stage 2 translation faults
when a Stage 1 permission fault or device alignment fault should
have been reported.

This patch implements the workaround (which is to validate that the
Stage-1 translation actually succeeds) by using code patching.

Cc: stable@vger.kernel.org
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/Kconfig
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kvm/hyp.S