kernel_optimize_test/arch/arm64
Oliver Upton a957d82b23 KVM: arm64: Handle PSCI resets before userspace touches vCPU state
[ Upstream commit 6826c6849b46aaa91300201213701eb861af4ba0 ]

The CPU_ON PSCI call takes a payload that KVM uses to configure a
destination vCPU to run. This payload is non-architectural state and not
exposed through any existing UAPI. Effectively, we have a race between
CPU_ON and userspace saving/restoring a guest: if the target vCPU isn't
ran again before the VMM saves its state, the requested PC and context
ID are lost. When restored, the target vCPU will be runnable and start
executing at its old PC.

We can avoid this race by making sure the reset payload is serviced
before userspace can access a vCPU's state.

Fixes: 358b28f09f ("arm/arm64: KVM: Allow a VCPU to fully reset itself")
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210818202133.1106786-3-oupton@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:28:04 +02:00
..
boot arm64: dts: ls1046a: fix eeprom entries 2021-09-18 13:40:28 +02:00
configs
crypto crypto: poly1305 - fix poly1305_core_setkey() declaration 2021-05-14 09:50:13 +02:00
include arm64: head: avoid over-mapping in map_memory 2021-09-18 13:40:08 +02:00
kernel arm64/sve: Use correct size when reinitialising SVE state 2021-09-22 12:27:54 +02:00
kvm KVM: arm64: Handle PSCI resets before userspace touches vCPU state 2021-09-22 12:28:04 +02:00
lib
mm arm64: consistently use reserved_pg_dir 2021-07-14 16:56:06 +02:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
xen
Kbuild
Kconfig arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically 2021-04-21 13:01:00 +02:00
Kconfig.debug
Kconfig.platforms
Makefile arm64: link with -z norelro for LLD or aarch64-elf 2021-01-12 20:18:24 +01:00