1
0
Fork 0
alistair23-linux/arch/arm64/include/uapi/asm
Mark Rutland cc7931dc76 KVM: arm64: Correct PSTATE on exception entry
commit a425372e73 upstream.

When KVM injects an exception into a guest, it generates the PSTATE
value from scratch, configuring PSTATE.{M[4:0],DAIF}, and setting all
other bits to zero.

This isn't correct, as the architecture specifies that some PSTATE bits
are (conditionally) cleared or set upon an exception, and others are
unchanged from the original context.

This patch adds logic to match the architectural behaviour. To make this
simple to follow/audit/extend, documentation references are provided,
and bits are configured in order of their layout in SPSR_EL2. This
layout can be seen in the diagram on ARM DDI 0487E.a page C5-429.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200108134324.46500-2-mark.rutland@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:35:16 -08:00
..
Kbuild kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
auxvec.h arm64: signal: Report signal frame size to userspace via auxv 2018-06-01 15:53:10 +01:00
bitsperlong.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
bpf_perf_event.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
byteorder.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
fcntl.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
hwcap.h arm64: Expose FRINT capabilities to userspace 2019-06-25 14:24:00 +01:00
kvm.h KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE 2019-09-09 12:29:09 +01:00
param.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
perf_regs.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
posix_types.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ptrace.h KVM: arm64: Correct PSTATE on exception entry 2020-02-11 04:35:16 -08:00
setup.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
sigcontext.h It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
signal.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
statfs.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
sve_context.h arm64/sve: Disentangle <uapi/asm/ptrace.h> from <uapi/asm/sigcontext.h> 2019-01-04 13:31:45 +00:00
ucontext.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
unistd.h arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers 2020-01-14 20:08:33 +01:00