linux/arch
James Morse 1229630af8 KVM: arm64: Stop handle_exit() from handling HVC twice when an SError occurs
Prior to commit defe21f49b ("KVM: arm64: Move PC rollback on SError to
HYP"), when an SError is synchronised due to another exception, KVM
handles the SError first. If the guest survives, the instruction that
triggered the original exception is re-exectued to handle the first
exception. HVC is treated as a special case as the instruction wouldn't
normally be re-exectued, as its not a trap.

Commit defe21f49b didn't preserve the behaviour of the 'return 1'
that skips the rest of handle_exit().

Since commit defe21f49b, KVM will try to handle the SError and the
original exception at the same time. When the exception was an HVC,
fixup_guest_exit() has already rolled back ELR_EL2, meaning if the
guest has virtual SError masked, it will execute and handle the HVC
twice.

Restore the original behaviour.

Fixes: defe21f49b ("KVM: arm64: Move PC rollback on SError to HYP")
Cc: stable@vger.kernel.org
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127122052.1584324-4-james.morse@arm.com
2022-02-03 09:20:05 +00:00
..
alpha bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
arc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
arm Tracing fixes for 5.17-rc1: 2022-01-28 19:30:35 +02:00
arm64 KVM: arm64: Stop handle_exit() from handling HVC twice when an SError occurs 2022-02-03 09:20:05 +00:00
csky bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
h8300 bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
hexagon bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
ia64 ia64: make IA64_MCA_RECOVERY bool instead of tristate 2022-01-30 09:56:58 +02:00
m68k bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
microblaze Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
mips pci-v5.17-fixes-2 2022-01-29 19:05:47 +02:00
nds32 Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
nios2 Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
openrisc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
parisc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
powerpc powerpc/64s/interrupt: Fix decrementer storm 2022-01-25 16:50:10 +11:00
riscv bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
s390 s390/hypfs: include z/VM guests with access control group set 2022-01-26 18:42:39 +01:00
sh bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
sparc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
um virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
x86 - Add another Intel CPU model to the list of CPUs supporting the 2022-01-30 12:55:06 +02:00
xtensa bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
.gitignore
Kconfig Merge branch 'akpm' (patches from Andrew) 2022-01-20 10:41:01 +02:00