linux/arch/arm64/kvm
Marc Zyngier 7d14919c0d arm64: KVM: Only force FPEXC32_EL2.EN if trapping FPSIMD
If trapping FPSIMD in the context of an AArch32 guest, it is critical
to set FPEXC32_EL2.EN to 1 so that the trapping is taken to EL2 and
not EL1.

Conversely, it is just as critical *not* to set FPEXC32_EL2.EN to 1
if we're not going to trap FPSIMD, as we then corrupt the existing
VFP state.

Moving the call to __activate_traps_fpsimd32 to the point where we
know for sure that we are going to trap ensures that we don't set that
bit spuriously.

Fixes: e6b673b741 ("KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing")
Cc: stable@vger.kernel.org # v4.18
Cc: Dave Martin <dave.martin@arm.com>
Reported-by: Alexander Graf <agraf@suse.de>
Tested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
2018-09-07 15:05:50 +02:00
..
hyp arm64: KVM: Only force FPEXC32_EL2.EN if trapping FPSIMD 2018-09-07 15:05:50 +02:00
debug.c KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags 2018-05-25 12:28:13 +01:00
fpsimd.c KVM: arm64: Avoid mistaken attempts to save SVE state for vcpus 2018-06-21 09:14:44 +01:00
guest.c KVM/arm updates for 4.19 2018-08-22 14:07:56 +02:00
handle_exit.c arm/arm64: KVM: Advertise SMCCC v1.1 2018-02-06 22:54:01 +00:00
hyp-init.S arm64: KVM: Cleanup tpidr_el2 init on non-VHE 2018-07-21 16:02:17 +01: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: Add KVM_GET/SET_VCPU_EVENTS 2018-07-21 16:02:30 +01:00
irq.h KVM: arm/arm64: Enable irqchip routing 2016-07-22 18:52:01 +01:00
Kconfig KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing 2018-05-25 12:28:28 +01:00
Makefile KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing 2018-05-25 12:28:28 +01:00
regmap.c kvm/arm: use PSR_AA32 definitions 2018-07-05 17:24:15 +01:00
reset.c KVM/arm updates for 4.19 2018-08-22 14:07:56 +02:00
sys_regs_generic_v8.c KVM: arm64: Rewrite system register accessors to read/write functions 2018-03-19 10:53:16 +00:00
sys_regs.c KVM: arm64: vgic-v3: Add support for ICC_SGI0R_EL1 and ICC_ASGI1R_EL1 accesses 2018-08-12 12:06:35 +01:00
sys_regs.h KVM: arm64: Rewrite system register accessors to read/write functions 2018-03-19 10:53:16 +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
va_layout.c arm64: KVM: Allow mapping of vectors outside of the RAM region 2018-03-19 13:06:46 +00:00
vgic-sys-reg-v3.c KVM: arm/arm64: Extract GICv3 max APRn index calculation 2017-09-05 17:33:39 +02:00