linux-stable/arch/arm64/kvm
Marc Zyngier e10703fd51 arm64: KVM: Fix system register enumeration
commit 5d8d4af244 upstream.

The introduction of the SVE registers to userspace started with a
refactoring of the way we expose any register via the ONE_REG
interface.

Unfortunately, this change doesn't exactly behave as expected
if the number of registers is non-zero and consider everything
to be an error. The visible result is that QEMU barfs very early
when creating vcpus.

Make sure we only exit early in case there is an actual error, rather
than a positive number of registers...

Fixes: be25bbb392 ("KVM: arm64: Factor out core register ID enumeration")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 12:02:12 +02:00
..
hyp arm64: Mitigate spectre style branch history side channels 2022-04-02 12:41:10 +02:00
debug.c KVM: arm64: Disable guest access to trace filter controls 2021-04-16 11:57:53 +02:00
guest.c arm64: KVM: Fix system register enumeration 2023-04-20 12:02:12 +02:00
handle_exit.c arm/arm64: KVM: Advertise SMCCC v1.1 2018-02-16 20:22:55 +01:00
hyp-init.S KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART 2020-07-22 09:22:18 +02:00
hyp.S arm64: hyp-stub/KVM: Kill __hyp_get_vectors 2017-04-09 07:49:34 -07:00
inject_fault.c arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort 2017-10-21 17:03:15 +02:00
irq.h
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regmap.c
reset.c KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded 2019-03-23 14:35:11 +01:00
sys_regs.c KVM: arm64: Don't access PMCR_EL0 when no PMU is available 2021-01-17 13:59:01 +01:00
sys_regs.h Merge remote-tracking branch 'rutland/kvm/common-sysreg' into next-fix 2017-04-09 07:50:34 -07:00
sys_regs_generic_v8.c KVM: arm64: Use common sysreg definitions 2017-03-22 18:38:26 +00:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vgic-sys-reg-v3.c KVM: arm/arm64: Extract GICv3 max APRn index calculation 2017-09-05 17:33:39 +02:00