linux_dsm_epyc7002/arch/arm64/kvm/hyp
Catalin Marinas 346f6a4636 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
2019-10-28 16:22:49 +00:00
..
debug-sr.c arm64: KVM: hyp: debug-sr: Mark expected switch fall-through 2019-07-29 11:01:37 +01:00
entry.S KVM: arm64: Skip more of the SError vaxorcism 2019-07-05 13:03:34 +01:00
fpsimd.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
hyp-entry.S KVM: arm64: Consume pending SError as early as possible 2019-07-05 13:03:29 +01:00
Makefile KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
switch.c Merge branch 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into for-next/core 2019-10-28 16:22:49 +00:00
sysreg-sr.c arm64: KVM: Prevent speculative S1 PTW when restoring vcpu context 2019-10-26 10:44:49 +01:00
tlb.c arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs 2019-10-26 10:43:53 +01:00
vgic-v2-cpuif-proxy.c KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s 2019-07-05 13:57:25 +01:00