KVM: arm64: Move SVE state mapping at HYP to finalize-time
authorMarc Zyngier <maz@kernel.org>
Thu, 14 Oct 2021 09:24:48 +0000 (10:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 1 Dec 2021 11:51:20 +0000 (11:51 +0000)
commitbff01a61af3c8b9756940c2fb0be2af570cdb5bf
tree3485c6a858ce12ade1a12442ffa0215709831820
parentd58071a8a76d779eedab38033ae4c821c30295a5
KVM: arm64: Move SVE state mapping at HYP to finalize-time

We currently map the SVE state to HYP on detection of a PID change.
Although this matches what we do for FPSIMD, this is pretty pointless
for SVE, as the buffer is per-vcpu and has nothing to do with the
thread that is being run.

Move the mapping of the SVE state to finalize-time, which is where
we allocate the state memory, and thus the most logical place to
do this.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/fpsimd.c
arch/arm64/kvm/reset.c