diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-08-23 12:51:43 +0200 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@arm.com> | 2018-09-07 15:05:50 +0200 |
commit | 7d14919c0d475a795c0127631ac8ecb2b0f31831 (patch) | |
tree | 84f8fac05bacd87e4e448acec0562305c927fbc0 /arch/arm/lib/memmove.S | |
parent | KVM: arm/arm64: Clean dcache to PoC when changing PTE due to CoW (diff) | |
download | linux-7d14919c0d475a795c0127631ac8ecb2b0f31831.tar.xz linux-7d14919c0d475a795c0127631ac8ecb2b0f31831.zip |
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: e6b673b741ea ("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>
Diffstat (limited to 'arch/arm/lib/memmove.S')
0 files changed, 0 insertions, 0 deletions