linux/arch
Marc Zyngier 6f00446c76 FROMGIT: KVM: arm64: Fix host's ZCR_EL2 restore on nVHE
We re-enter the EL1 host with CPTR_EL2.TZ set in order to
be able to lazily restore ZCR_EL2 when required.

However, the same CPTR_EL2 configuration also leads to trapping
when ZCR_EL2 is accessed from EL2. Duh!

Clear CPTR_EL2.TZ *before* writing to ZCR_EL2.

Fixes: beed09067b ("KVM: arm64: Trap host SVE accesses when the FPSIMD state is dirty")
Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
(cherry picked from commit 5b08709313
 git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 178098380
Test: atest VirtualizationHostTestCases on an EL2-enabled device
Change-Id: Iea1c43f91edc32d176e351b80fd860d5f473fa19
2021-03-19 08:24:37 +00:00
..
alpha
arc
arm This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
arm64 FROMGIT: KVM: arm64: Fix host's ZCR_EL2 restore on nVHE 2021-03-19 08:24:37 +00:00
c6x
csky Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
h8300
hexagon
ia64
m68k
microblaze
mips Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
nds32
nios2
openrisc
parisc This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
powerpc This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
riscv This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
s390 Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
sh
sparc Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
um Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
x86 Revert "ANDROID: GKI: Enable bounds sanitizer" 2021-03-17 21:22:15 +00:00
xtensa
.gitignore
Kconfig ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS 2021-03-06 01:39:52 +00:00