aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/cpucaps.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2019-10-28 16:22:49 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2019-10-28 16:22:49 +0000
commit346f6a4636f64c19a27722cf6ec93b38bb4251d4 (patch)
tree0ee2f22a76f5d18ef7003cdab4ef61a1ee1438aa /arch/arm64/include/asm/cpucaps.h
parentMerge branch 'for-next/neoverse-n1-stale-instr' into for-next/core (diff)
parentarm64: Enable and document ARM errata 1319367 and 1319537 (diff)
downloadlinux-dev-346f6a4636f64c19a27722cf6ec93b38bb4251d4.tar.xz
linux-dev-346f6a4636f64c19a27722cf6ec93b38bb4251d4.zip
Merge branch 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into for-next/core
Similarly to erratum 1165522 that affects Cortex-A76, A57 and A72 respectively suffer from errata 1319537 and 1319367, potentially resulting in TLB corruption if the CPU speculates an AT instruction while switching guests. The fix is slightly more involved since we don't have VHE to help us here, but the idea is the same: when switching a guest in, we must prevent any speculated AT from being able to parse the page tables until S2 is up and running. Only at this stage can we allow AT to take place. For this, we always restore the guest sysregs first, except for its SCTLR and TCR registers, which must be set with SCTLR.M=1 and TCR.EPD{0,1} = {1, 1}, effectively disabling the PTW and TLB allocation. Once S2 is setup, we restore the guest's SCTLR and TCR. Similar things must be done on TLB invalidation... * 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms: arm64: Enable and document ARM errata 1319367 and 1319537 arm64: KVM: Prevent speculative S1 PTW when restoring vcpu context arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs arm64: KVM: Reorder system register restoration and stage-2 activation arm64: Add ARM64_WORKAROUND_1319367 for all A57 and A72 versions
Diffstat (limited to 'arch/arm64/include/asm/cpucaps.h')
-rw-r--r--arch/arm64/include/asm/cpucaps.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h
index 1dc3c762fdcb..b92683871119 100644
--- a/arch/arm64/include/asm/cpucaps.h
+++ b/arch/arm64/include/asm/cpucaps.h
@@ -55,7 +55,8 @@
#define ARM64_WORKAROUND_CAVIUM_TX2_219_TVM 45
#define ARM64_WORKAROUND_CAVIUM_TX2_219_PRFM 46
#define ARM64_WORKAROUND_1542419 47
+#define ARM64_WORKAROUND_1319367 48
-#define ARM64_NCAPS 48
+#define ARM64_NCAPS 49
#endif /* __ASM_CPUCAPS_H */