KVM: arm64: Add save/restore support for FPMR
authorMarc Zyngier <maz@kernel.org>
Tue, 20 Aug 2024 13:17:58 +0000 (14:17 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 27 Aug 2024 06:59:27 +0000 (07:59 +0100)
commitef3be86021c3bdf384c36d9d4aa1ee9fe65b95af
tree8c138860a4c6038f873ef7e454e34ecc0dbdff34
parent7d9c1ed6f4bfa8d5fcafad847ac64e2839a04301
KVM: arm64: Add save/restore support for FPMR

Just like the rest of the FP/SIMD state, FPMR needs to be context
switched.

The only interesting thing here is that we need to treat the pKVM
part a bit differently, as the host FP state is never written back
to the vcpu thread, but instead stored locally and eagerly restored.

Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240820131802.3547589-5-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/fpsimd.c
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/switch.c
arch/arm64/kvm/hyp/vhe/switch.c