1
0
Fork 0
alistair23-linux/arch/arm64
Marc Zyngier 8128576788 KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
commit 0370964dd3 upstream.

On a VHE system, the EL1 state is left in the CPU most of the time,
and only syncronized back to memory when vcpu_put() is called (most
of the time on preemption).

Which means that when injecting an exception, we'd better have a way
to either:
(1) write directly to the EL1 sysregs
(2) synchronize the state back to memory, and do the changes there

For an AArch64, we already do (1), so we are safe. Unfortunately,
doing the same thing for AArch32 would be pretty invasive. Instead,
we can easily implement (2) by calling the put/load architectural
backends, and keep preemption disabled. We can then reload the
state back into EL1.

Cc: stable@vger.kernel.org
Reported-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-17 16:40:38 +02:00
..
boot arm64: dts: mt8173: fix vcodec-enc clock 2020-06-03 08:21:19 +02:00
configs arm64/ARM: configs: Change CONFIG_REMOTEPROC from m to y 2019-09-30 11:48:00 -07:00
crypto crypto: arch/nhpoly1305 - process in explicit 4k chunks 2020-05-14 07:58:25 +02:00
include KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception 2020-06-17 16:40:38 +02:00
kernel arm64: Fix PTRACE_SYSEMU semantics 2020-05-27 17:46:40 +02:00
kvm KVM: arm64: Stop writing aarch32's CSSELR into ACTLR 2020-06-17 16:40:34 +02:00
lib arm64: uaccess: Remove uaccess_*_not_uao asm macros 2019-11-20 18:51:54 +00:00
mm arm64: hugetlb: avoid potential NULL dereference 2020-05-14 07:58:26 +02:00
net arm64: bpf: optimize modulo operation 2019-09-03 15:44:40 +02:00
xen xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419 2020-04-29 16:32:56 +02:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.platforms arm64: exynos: Enable exynos-chipid driver 2019-09-04 22:43:26 +02:00
Makefile arm64: Always force a branch protection mode when the compiler has one 2020-04-17 10:50:23 +02:00